<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
  <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css' /><title>mongos &mdash; MongoDB Manual</title><link rel="shortcut icon" href="https://media.mongodb.org/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index" />

  <meta name="release" content="4.2.5"/>
  <meta name="version" content="4.2"/>
  <meta name="DC.Source" content="https://github.com/mongodb/docs/blob/v4.2/source/reference/program/mongos.txt"/>
  <meta property="og:image" content="http://s3.amazonaws.com/info-mongodb-com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
  <meta property="og:image:secure_url" content="https://webassets.mongodb.com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
      <link rel="canonical" href="https://docs.mongodb.com/manual/reference/program/mongos" />
  
   <link rel="stylesheet" href="../../_static/mongodb-docs.css" type="text/css" />
   <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
   <link rel="stylesheet" href="../../_static/css/navbar.min.css" type="text/css" />
    
    <script type="text/javascript" src="../../_static/lib/jquery.min.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/lib/bootstrap.js"></script>
    <script type="text/javascript" src="../../_static/lib/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../_static/controller.js"></script>
      <link rel="search" type="application/opensearchdescription+xml" href="https://docs.mongodb.com/osd.xml" title="MongoDB Help"/>
<link rel="author" title="About these documents" href="../../about.html" />
<!-- <link rel="index" title="Index" href="../../genindex.html" /> -->
<link rel="search" title="Search" href="../../search.html" />
<link rel="top" title="MongoDB Manual" href="../../index.html" />
<link rel="up" title="MongoDB Package Components" href="../program.html" />
<link rel="next" title="mongo" href="mongo.html" />
<link rel="prev" title="mongod" href="mongod.html" /><script type='text/javascript'>
   var gptadslots=[];
   var googletag = googletag || {};
   googletag.cmd = googletag.cmd || [];
   (function(){ var gads = document.createElement('script');
      gads.async = true; gads.type = 'text/javascript';
      var useSSL = 'https:' == document.location.protocol;
      gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
      var node = document.getElementsByTagName('script')[0];
      node.parentNode.insertBefore(gads, node);
   })();
</script>

<script type="text/javascript">
   googletag.cmd.push(function() {

      var pathname = location.href;
      
      if ( (pathname.indexOf("auth") >= 0) || (pathname.indexOf("security") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/security', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if ( (pathname.indexOf("crud") >= 0) ||  (pathname.indexOf("query") >= 0) || (pathname.indexOf("insert") >= 0) || (pathname.indexOf("update") >= 0) || (pathname.indexOf("remove") >= 0) || (pathname.indexOf("delete") >= 0) || (pathname.indexOf("aggregation") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/crud', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("shard") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/sharding', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("replica") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/replication', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("model") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/data-modeling', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("administration") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/support', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("install-mongodb-on-windows") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/install-mongodb-on-windows', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("tutorial/getting-started") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/docs_server_gettingstarted', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else {
         //Adslot 1 declaration
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      }
      googletag.pubads().enableSingleRequest();
      googletag.pubads().enableAsyncRendering();
      googletag.enableServices();
   });
</script></head>
<body data-project="manual" data-project-title="MongoDB Manual" data-branch="v4.2" data-enable-marian=1>
  <!-- Google Tag Manager -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-JQHP"
                    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(
     {'gtm.start': new Date().getTime(),event:'gtm.js'}
   );var f=d.getElementsByTagName(s)[0],
   j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
   '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
   })(window,document,'script','dataLayer','GTM-JQHP');</script>
  <!-- End Google Tag Manager -->
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server","active": true},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
      <script>
        window.googleSearchCx = "017213726194841070573:WMX6838984"
	window.googleSearchPlaceholder = "Search Documentation"
        window.googleSearchResultsUrl = "http://docs.mongodb.com/manual/search/"
      </script>
    <script src="../../_static/navbar.min.js"></script>
  

  <div class="content" >

   <div id="left-column">
         <aside id="sidebar" class="sidebar">
             
  <div class="sphinxsidebar" id="sphinxsidebar">
    <div id="sphinxsidebarwrapper" class="sphinxsidebarwrapper"><a href="javascript:void(0)" class="closeNav" id="closeNav">Close &times;</a>


<h3>
  <a class="index-link" href="../../index.html">MongoDB Manual</a>
</h3>


    <div class="btn-group version-sidebar">
      <button type="button" class="version-button dropdown-toggle" data-toggle="dropdown">
        
        
        Version 4.2 (current)<span class="caret"></span>
      </button>
      <ul class="dropdown-menu" role="menu">
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="master">
              
              Version 4.4 (upcoming)
            </a>
          </li>
        
          
          <li class="active">
          
            <a href="#" data-path="manual">
              
              Version 4.2 (current)
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v4.0">
              
              Version 4.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.6">
              
              Version 3.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.4">
              
              Version 3.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.2">
              
              Version 3.2
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.0">
              
              Version 3.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.6">
              
              Version 2.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.4">
              
              Version 2.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.2">
              
              Version 2.2
            </a>
          </li>
        
      </ul>
    </div>


<ul class="current"><li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Introduction</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/getting-started.html">Getting Started</a></li><li class="toctree-l2"><a class="reference external" href="https://docs.atlas.mongodb.com/getting-started/">Create an Atlas Free Tier Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/databases-and-collections.html">Databases and Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/views.html">Views</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/materialized-views.html">On-Demand Materialized Views</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/capped-collections.html">Capped Collections</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/document.html">Documents</a></li><li class="toctree-l2"><a class="reference internal" href="../bson-types.html">BSON Types</a><ul><li class="toctree-l3"><a class="reference internal" href="../bson-type-comparison-order.html">Comparison/Sort Order</a></li><li class="toctree-l3"><a class="reference internal" href="../mongodb-extended-json.html">MongoDB Extended JSON (v2)</a></li><li class="toctree-l3"><a class="reference internal" href="../mongodb-extended-json-v1.html">MongoDB Extended JSON (v1)</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../installation.html">Installation</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/install-community.html">Install MongoDB Community Edition</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/install-on-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li><li class="toctree-l5"><a class="reference internal" href="../installation-ubuntu-community-troubleshooting.html">Troubleshoot Ubuntu Installation</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-on-os-x.html">Install on macOS</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-os-x-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/install-enterprise.html">Install MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/install-enterprise-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-os-x.html">Install on macOS</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-with-docker.html">Install with Docker</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/upgrade-community-to-enterprise.html">Upgrade MongoDB Community to MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-standalone.html">Upgrade to MongoDB Enterprise (Standalone)</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-replica-set.html">Upgrade to MongoDB Enterprise (Replica Set)</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-sharded-cluster.html">Upgrade to MongoDB Enterprise (Sharded Cluster)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/verify-mongodb-packages.html">Verify Integrity of MongoDB Packages</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../mongo.html">The <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/configure-mongo-shell.html">Configure the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/access-mongo-shell-help.html">Access the <code class="docutils literal"><span class="pre">mongo</span></code> Shell Help</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/write-scripts-for-the-mongo-shell.html">Write Scripts for the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/shell-types.html">Data Types in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../mongo-shell.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Quick Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../crud.html">MongoDB CRUD Operations</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/insert-documents.html">Insert Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../insert-methods.html">Insert Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/query-documents.html">Query Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-embedded-documents.html">Query on Embedded/Nested Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-arrays.html">Query an Array</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-array-of-documents.html">Query an Array of Embedded Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/project-fields-from-query-results.html">Project Fields to Return from Query</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-for-null-fields.html">Query for Null or Missing Fields</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/iterate-a-cursor.html">Iterate a Cursor in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/update-documents.html">Update Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/update-documents-with-aggregation-pipeline.html">Updates with Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../update-methods.html">Update Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/remove-documents.html">Delete Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../delete-methods.html">Delete Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/bulk-write-operations.html">Bulk Write Operations</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/retryable-writes.html">Retryable Writes</a></li><li class="toctree-l2"><a class="reference internal" href="../sql-comparison.html">SQL to MongoDB Mapping Chart</a></li><li class="toctree-l2"><a class="reference internal" href="../../text-search.html">Text Search</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/link-text-indexes.html">Text Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/text-search-operators.html">Text Search Operators</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/text-search-in-aggregation.html">Text Search in the Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../text-search-languages.html">Text Search Languages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../geospatial-queries.html">Geospatial Queries</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/geospatial-tutorial.html">Find Restaurants with Geospatial Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../geojson.html">GeoJSON Objects</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../read-concern.html">Read Isolation (Read Concern)</a><ul><li class="toctree-l3"><a class="reference internal" href="../read-concern-local.html">Read Concern <code class="docutils literal"><span class="pre">&quot;local&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-available.html">Read Concern <code class="docutils literal"><span class="pre">&quot;available&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-majority.html">Read Concern <code class="docutils literal"><span class="pre">&quot;majority&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-linearizable.html">Read Concern <code class="docutils literal"><span class="pre">&quot;linearizable&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-snapshot.html">Read Concern <code class="docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../write-concern.html">Write Acknowledgement (Write Concern)</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/crud.html">MongoDB CRUD Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/write-operations-atomicity.html">Atomicity and Transactions</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-isolation-consistency-recency.html">Read Isolation, Consistency, and Recency</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/causal-consistency-read-write-concerns.html">Causal Consistency and Read and Write Concerns</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/distributed-queries.html">Distributed Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-findAndModify-linearizable-reads.html">Linearizable Reads via <code class="docutils literal"><span class="pre">findAndModify</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../../core/query-plans.html">Query Plans</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/query-optimization.html">Query Optimization</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/evaluate-operation-performance.html">Evaluate Performance of Current Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/optimize-query-performance-with-indexes-and-projections.html">Optimize Query Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/write-performance.html">Write Operation Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../explain-results.html">Explain Results</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/analyze-query-plan.html">Analyze Query Performance</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/tailable-cursors.html">Tailable Cursors</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../aggregation.html">Aggregation</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/aggregation-pipeline.html">Aggregation Pipeline</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-optimization.html">Aggregation Pipeline Optimization</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-limits.html">Aggregation Pipeline Limits</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-sharded-collections.html">Aggregation Pipeline and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/aggregation-zip-code-data-set.html">Example with ZIP Code Data</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/aggregation-with-user-preference-data.html">Example with User Preference Data</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/map-reduce.html">Map-Reduce</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/map-reduce-sharded-collections.html">Map-Reduce and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/map-reduce-concurrency.html">Map-Reduce Concurrency</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/map-reduce-examples.html">Map-Reduce Examples</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-incremental-map-reduce.html">Perform Incremental Map-Reduce</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-map-function.html">Troubleshoot the Map Function</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-reduce-function.html">Troubleshoot the Reduce Function</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../aggregation.html">Aggregation Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../../meta/aggregation-quick-reference.html">Aggregation Pipeline Quick Reference</a></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation/interface.html">Aggregation Commands</a></li><li class="toctree-l3"><a class="reference internal" href="../aggregation-commands-comparison.html">Aggregation Commands Comparison</a></li><li class="toctree-l3"><a class="reference internal" href="../aggregation-variables.html">Variables in Aggregation Expressions</a></li><li class="toctree-l3"><a class="reference internal" href="../sql-aggregation-comparison.html">SQL to Aggregation Mapping Chart</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../data-modeling.html">Data Models</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/data-modeling-introduction.html">Data Modeling Introduction</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/schema-validation.html">Schema Validation</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/data-models.html">Data Modeling Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/data-model-design.html">Data Model Design</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/data-model-operations.html">Operational Factors and Data Models</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../applications/data-models.html">Data Model Examples and Patterns</a><ul><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-relationships.html">Model Relationships Between Documents</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-embedded-one-to-one-relationships-between-documents.html">Model One-to-One Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-embedded-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-referenced-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Document References</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-tree-structures.html">Model Tree Structures</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-parent-references.html">Model Tree Structures with Parent References</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-child-references.html">Model Tree Structures with Child References</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-ancestors-array.html">Model Tree Structures with an Array of Ancestors</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-materialized-paths.html">Model Tree Structures with Materialized Paths</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-nested-sets.html">Model Tree Structures with Nested Sets</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-applications.html">Model Specific Application Contexts</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-atomic-operations.html">Model Data for Atomic Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-keyword-search.html">Model Data to Support Keyword Search</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-schema-versioning.html">Model Data for Schema Versioning</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-monetary-data.html">Model Monetary Data</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-time-data.html">Model Time Data</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-computed-data.html">Model Computed Data</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../data-models.html">Data Model Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../database-references.html">Database References</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../core/transactions.html">Transactions</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-in-applications.html">Drivers API</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-production-consideration.html">Production Considerations</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-sharded-clusters.html">Production Considerations (Sharded Clusters)</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-operations.html">Transactions and Operations</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../indexes.html">Indexes</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/index-single.html">Single Field Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-compound.html">Compound Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-multikey.html">Multikey Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/multikey-index-bounds.html">Multikey Index Bounds</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-text.html">Text Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/specify-language-for-text-index.html">Specify a Language for Text Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/avoid-text-index-name-limit.html">Specify Name for <code class="docutils literal"><span class="pre">text</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/control-results-of-text-search.html">Control Search Results with Weights</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/limit-number-of-items-scanned-for-text-search.html">Limit the Number of Entries Scanned</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-wildcard.html">Wildcard Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../index-wildcard-restrictions.html">Wildcard Index Restrictions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/2dsphere.html"><code class="docutils literal"><span class="pre">2dsphere</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-2dsphere-index.html">Query a <code class="docutils literal"><span class="pre">2dsphere</span></code> Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/2d.html"><code class="docutils literal"><span class="pre">2d</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-a-2d-index.html">Create a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-2d-index.html">Query a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/geospatial-indexes.html"><code class="docutils literal"><span class="pre">2d</span></code> Index Internals</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes.html">Calculate Distance Using Spherical Geometry</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/geohaystack.html"><code class="docutils literal"><span class="pre">geoHaystack</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-a-geohaystack-index.html">Create a Haystack Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-geohaystack-index.html">Query a Haystack Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-hashed.html">Hashed Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-properties.html">Index Properties</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/index-ttl.html">TTL Indexes</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/expire-data.html">Expire Data from Collections by Setting TTL</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-unique.html">Unique Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-partial.html">Partial Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-case-insensitive.html">Case Insensitive Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-sparse.html">Sparse Indexes</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-creation.html">Index Builds on Populated Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-indexes-on-replica-sets.html">Build Indexes on Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-indexes-on-sharded-clusters.html">Build Indexes on Sharded Clusters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-intersection.html">Index Intersection</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/manage-indexes.html">Manage Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/measure-index-use.html">Measure Index Use</a></li><li class="toctree-l2"><a class="reference internal" href="../../applications/indexes.html">Indexing Strategies</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-indexes-to-support-queries.html">Create Indexes to Support Your Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sort-results-with-indexes.html">Use Indexes to Sort Query Results</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/ensure-indexes-fit-ram.html">Ensure Indexes Fit in RAM</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-queries-that-ensure-selectivity.html">Create Queries that Ensure Selectivity</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../indexes.html">Indexing Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../security.html">Security</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/security-checklist.html">Security Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/enable-authentication.html">Enable Access Control</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/authentication.html">Authentication</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-users.html">Users</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/create-users.html">Add Users</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/authentication-mechanisms.html">Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/security-scram.html">SCRAM</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-x.509.html">x.509</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-x509-client-authentication.html">Use x.509 Certificates to Authenticate Clients</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/authentication-mechanisms-enterprise.html">Enterprise Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/kerberos.html">Kerberos Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/control-access-to-mongodb-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Linux</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/control-access-to-mongodb-windows-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Windows</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/troubleshoot-kerberos.html">Troubleshoot Kerberos Authentication</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/kerberos-auth-activedirectory-authz.html">Configure MongoDB with Kerberos Authentication and Active Directory Authorization</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-ldap.html">LDAP Proxy Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-ldap-sasl-activedirectory.html">Authenticate Using SASL and LDAP with ActiveDirectory</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-ldap-sasl-openldap.html">Authenticate Using SASL and LDAP with OpenLDAP</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/authenticate-nativeldap-activedirectory.html">Authenticate and Authorize Users Using Active Directory via Native LDAP</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-ldap-external.html">LDAP Authorization</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-internal-authentication.html">Internal/Membership Authentication</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/deploy-replica-set-with-keyfile-access-control.html">Deploy Replica Set With Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-replica-set.html">Update Replica Set to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-replica-set-without-downtime.html">Update Replica Set to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-key-replica-set.html">Rotate Keys for Replica Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/deploy-sharded-cluster-with-keyfile-access-control.html">Deploy Sharded Cluster with Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.html">Update Sharded Cluster to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.html">Update Sharded Cluster to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-key-sharded-cluster.html">Rotate Keys for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html">Use x.509 Certificate for Membership Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/upgrade-keyfile-to-x509.html">Upgrade from Keyfile Authentication to x.509 Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-x509-membership-certificates.html">Rolling Update of x.509 Cluster Certificates that Contain New DN</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/authorization.html">Role-Based Access Control</a><ul><li class="toctree-l3"><a class="reference internal" href="../built-in-roles.html">Built-In Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-user-defined-roles.html">User-Defined Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-users-and-roles.html">Manage Users and Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-own-password-and-custom-data.html">Change Your Password and Custom Data</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/collection-level-access-control.html">Collection-Level Access Control</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-transport-encryption.html">TLS/SSL (Transport Encryption)</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-ssl.html">Configure <code class="docutils literal"><span class="pre">mongod</span></code> and <code class="docutils literal"><span class="pre">mongos</span></code> for TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-ssl-clients.html">TLS/SSL Configuration for Clients</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-cluster-to-ssl.html">Upgrade a Cluster to Use TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-fips.html">Configure MongoDB for FIPS</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-encryption-at-rest.html">Encryption at Rest</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-encryption.html">Configure Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/rotate-encryption-key.html">Rotate Encryption Keys</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-client-side-encryption.html">Client-Side Field Level Encryption</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-automatic-client-side-encryption.html">Automatic Client-Side Field Level Encryption</a><ul><li class="toctree-l4"><a class="reference internal" href="../security-client-side-automatic-json-schema.html">Automatic Encryption Rules</a></li><li class="toctree-l4"><a class="reference internal" href="../security-client-side-query-aggregation-support.html">Read/Write Support with Automatic Field Level Encryption</a></li><li class="toctree-l4"><a class="reference internal" href="../security-client-side-encryption-appendix.html">Appendix</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-explicit-client-side-encryption.html">Explicit (Manual) Client-Side Field Level Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-client-side-encryption-key-management.html">Master Key and Data Encryption Key Management</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/manage-client-side-encryption-data-keys.html">Manage Data Encryption Keys</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../security-client-side-encryption-limitations.html">Limitations</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/auditing.html">Auditing</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-auditing.html">Configure Auditing</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-audit-filters.html">Configure Audit Filters</a></li><li class="toctree-l3"><a class="reference internal" href="../audit-message.html">System Event Audit Messages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-hardening.html">Network and Configuration Hardening</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-mongodb-configuration.html">IP Binding</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-linux-iptables-firewall.html">Configure Linux <code class="docutils literal"><span class="pre">iptables</span></code> Firewall for MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-windows-netsh-firewall.html">Configure Windows <code class="docutils literal"><span class="pre">netsh</span></code> Firewall for MongoDB</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/implement-field-level-redaction.html">Implement Field Level Redaction</a></li><li class="toctree-l2"><a class="reference internal" href="../security.html">Security Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../system-roles-collection.html"><code class="docutils literal"><span class="pre">system.roles</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../system-users-collection.html"><code class="docutils literal"><span class="pre">system.users</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../resource-document.html">Resource Document</a></li><li class="toctree-l3"><a class="reference internal" href="../privilege-actions.html">Privilege Actions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/create-a-vulnerability-report.html">Create a Vulnerability Report</a></li><li class="toctree-l2"><a class="reference internal" href="../../appendix/security.html">Appendix</a><ul><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixA-openssl-ca.html">Appendix A - OpenSSL CA Certificate for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixB-openssl-server.html">Appendix B - OpenSSL Server Certificates for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixC-openssl-client.html">Appendix C - OpenSSL Client Certificates for Testing</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../changeStreams.html">Change Streams</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/change-streams-production-recommendations.html">Change Streams Production Recommendations</a></li><li class="toctree-l2"><a class="reference internal" href="../change-events.html">Change Events</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../replication.html">Replication</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-members.html">Replica Set Members</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-primary.html">Replica Set Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-secondary.html">Replica Set Secondary Members</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-priority-0-member.html">Priority 0 Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-hidden-member.html">Hidden Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-delayed-member.html">Delayed Replica Set Members</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-arbiter.html">Replica Set Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-oplog.html">Replica Set Oplog</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-sync.html">Replica Set Data Synchronization</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-architectures.html">Replica Set Deployment Architectures</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-architecture-three-members.html">Three Member Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-architecture-geographically-distributed.html">Replica Sets Distributed Across Two or More Data Centers</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-high-availability.html">Replica Set High Availability</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-elections.html">Replica Set Elections</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-rollbacks.html">Rollbacks During Replica Set Failover</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../applications/replication.html">Replica Set Read and Write Semantics</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-write-concern.html">Write Concern for Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-preference.html">Read Preference</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-tags.html">Tag Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-staleness.html">maxStalenessSeconds</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-use-cases.html">Read Preference Use Cases</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-preference-mechanics.html">Server Selection Algorithm</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-deployment.html">Replica Set Deployment Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-replica-set.html">Deploy a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-replica-set-for-testing.html">Deploy a Replica Set for Testing and Development</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-geographically-distributed-replica-set.html">Deploy a Geographically Redundant Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/add-replica-set-arbiter.html">Add an Arbiter to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-standalone-to-replica-set.html">Convert a Standalone to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/expand-replica-set.html">Add Members to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/remove-replica-set-member.html">Remove Members from Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/replace-replica-set-member.html">Replace a Replica Set Member</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-member-configuration.html">Member Configuration Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/adjust-replica-set-member-priority.html">Adjust Priority for Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-secondary-only-replica-set-member.html">Prevent Secondary from Becoming Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-hidden-replica-set-member.html">Configure a Hidden Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-delayed-replica-set-member.html">Configure a Delayed Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-non-voting-replica-set-member.html">Configure Non-Voting Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-secondary-into-arbiter.html">Convert a Secondary to an Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-maintenance.html">Replica Set Maintenance Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-oplog-size.html">Change the Size of the Oplog</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-maintence-on-replica-set-members.html">Perform Maintenance on Replica Set Members</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/force-member-to-be-primary.html">Force a Member to Become Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/resync-replica-set-member.html">Resync a Member of a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-replica-set-tag-sets.html">Configure Replica Set Tag Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/reconfigure-replica-set-with-unavailable-members.html">Reconfigure a Replica Set with Unavailable Members</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-chained-replication.html">Manage Chained Replication</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-hostnames-in-a-replica-set.html">Change Hostnames in a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-replica-set-secondary-sync-target.html">Configure a Secondary’s Sync Target</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../replication.html">Replication Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../replica-configuration.html">Replica Set Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../replica-set-protocol-versions.html">Replica Set Protocol Version</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-replica-sets.html">Troubleshoot Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../local-database.html">The <code class="docutils literal"><span class="pre">local</span></code> Database</a></li><li class="toctree-l3"><a class="reference internal" href="../replica-states.html">Replica Set Member States</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../sharding.html">Sharding</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/sharded-cluster-components.html">Sharded Cluster Components</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-shards.html">Shards</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-config-servers.html">Config Servers (metadata)</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-query-router.html">Router (mongos)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-shard-key.html">Shard Keys</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/hashed-sharding.html">Hashed Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/ranged-sharding.html">Ranged Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/deploy-shard-cluster.html">Deploy a Sharded Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/zone-sharding.html">Zones</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-data-partitioning.html">Data Partitioning with Chunks</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-chunks-in-sharded-cluster.html">Create Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/split-chunks-in-sharded-cluster.html">Split Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/merge-chunks-in-sharded-cluster.html">Merge Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/modify-chunk-size-in-sharded-cluster.html">Modify Chunk Size in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-balancer-administration.html">Balancer</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-sharded-cluster-balancer.html">Manage Sharded Cluster Balancer</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/migrate-chunks-in-sharded-cluster.html">Migrate Chunks in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/sharded-cluster-administration.html">Administration</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/sharded-cluster-config-servers.html">Config Server Administration</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/replace-config-server.html">Replace a Config Server</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/view-sharded-cluster-configuration.html">View Cluster Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/restart-sharded-cluster.html">Restart a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/migrate-sharded-cluster-to-new-hardware.html">Migrate a Sharded Cluster to Different Hardware</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/add-shards-to-shard-cluster.html">Add Shards to a Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/remove-shards-from-cluster.html">Remove Shards from an Existing Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/clear-jumbo-flag.html">Clear <code class="docutils literal"><span class="pre">jumbo</span></code> Flag</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-metadata.html">Back Up Cluster Metadata</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-sharded-cluster-to-replica-set.html">Convert Sharded Cluster to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-replica-set-to-replicated-shard-cluster.html">Convert a Replica Set to a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-shard-standalone-to-shard-replica-set.html">Convert a Shard Standalone to a Shard Replica Set</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../sharding.html">Sharding Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-requirements.html">Operational Restrictions</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-sharded-clusters.html">Troubleshoot Sharded Clusters</a></li><li class="toctree-l3"><a class="reference internal" href="../config-database.html">Config Database</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../administration.html">Administration</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/production-notes.html">Production Notes</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/production-checklist-operations.html">Operations Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/production-checklist-development.html">Development Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/analyzing-mongodb-performance.html">Performance</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-the-database-profiler.html">Database Profiler</a><ul><li class="toctree-l4"><a class="reference internal" href="../database-profiler.html">Database Profiler Output</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/transparent-huge-pages.html">Disable Transparent Huge Pages (THP)</a></li><li class="toctree-l3"><a class="reference internal" href="../ulimit.html">UNIX <code class="docutils literal"><span class="pre">ulimit</span></code> Settings</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/configuration-and-maintenance.html">Configuration and Maintenance</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/configuration.html">Run-time Database Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-revision.html">Upgrade to the Latest Revision of MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-mongodb-processes.html">Manage <code class="docutils literal"><span class="pre">mongod</span></code> Processes</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/terminate-running-operations.html">Terminate Running Operations</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/rotate-log-files.html">Rotate Log Files</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../data-center-awareness.html">Data Center Awareness</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/workload-isolation.html">Workload Isolation in MongoDB Deployments</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/zone-sharding.html">Zones</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/backups.html">MongoDB Backup Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-with-filesystem-snapshots.html">Back Up and Restore with Filesystem Snapshots</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-and-restore-tools.html">Back Up and Restore with MongoDB Tools</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/restore-replica-set-from-backup.html">Restore a Replica Set from MongoDB Backups</a></li><li class="toctree-l3"><a class="reference internal" href="../../administration/backup-sharded-clusters.html">Backup and Restore Sharded Clusters</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-with-filesystem-snapshots.html">Back Up a Sharded Cluster with File System Snapshots</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-with-database-dumps.html">Back Up a Sharded Cluster with Database Dumps</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/schedule-backup-window-for-sharded-clusters.html">Schedule Backup Window for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/restore-sharded-cluster.html">Restore a Sharded Cluster</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/recover-data-following-unexpected-shutdown.html">Recover a Standalone after an Unexpected Shutdown</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/monitoring.html">Monitoring for MongoDB</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/free-monitoring.html">Free Monitoring</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/monitor-with-snmp.html">Monitor MongoDB With SNMP on Linux</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/monitor-with-snmp-on-windows.html">Monitor MongoDB Windows with SNMP</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-snmp.html">Troubleshoot SNMP</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../storage.html">Storage</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/storage-engines.html">Storage Engines</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/wiredtiger.html">WiredTiger Storage Engine</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-standalone-wiredtiger.html">Change Standalone to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-replica-set-wiredtiger.html">Change Replica Set to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-sharded-cluster-wiredtiger.html">Change Sharded Cluster to WiredTiger</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/inmemory.html">In-Memory Storage Engine</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/journaling.html">Journaling</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-journaling.html">Manage Journaling</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/gridfs.html">GridFS</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/storage.html">FAQ: MongoDB Storage</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../faq.html">Frequently Asked Questions</a><ul><li class="toctree-l2"><a class="reference internal" href="../../faq/fundamentals.html">FAQ: MongoDB Fundamentals</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/indexes.html">FAQ: Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/concurrency.html">FAQ: Concurrency</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/sharding.html">FAQ: Sharding with MongoDB</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/replica-sets.html">FAQ: Replication and Replica Sets</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/storage.html">FAQ: MongoDB Storage</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/diagnostics.html">FAQ: MongoDB Diagnostics</a></li></ul></li><li class="toctree-l1 current"><a class="reference internal" href="../../reference.html">Reference</a><ul class="current"><li class="toctree-l2"><a class="reference internal" href="../operator.html">Operators</a><ul><li class="toctree-l3"><a class="reference internal" href="../operator/query.html">Query and Projection Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/query-comparison.html">Comparison Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/eq.html">$eq</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/gt.html">$gt</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/gte.html">$gte</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/in.html">$in</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/lt.html">$lt</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/lte.html">$lte</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/ne.html">$ne</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nin.html">$nin</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-logical.html">Logical Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/and.html">$and</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/not.html">$not</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nor.html">$nor</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/or.html">$or</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-element.html">Element Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/exists.html">$exists</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/type.html">$type</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-evaluation.html">Evaluation Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/expr.html">$expr</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/jsonSchema.html">$jsonSchema</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/mod.html">$mod</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/regex.html">$regex</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/text.html">$text</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/where.html">$where</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-geospatial.html">Geospatial Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/geoIntersects.html">$geoIntersects</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/geoWithin.html">$geoWithin</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/near.html">$near</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nearSphere.html">$nearSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/box.html">$box</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/center.html">$center</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/centerSphere.html">$centerSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/geometry.html">$geometry</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/maxDistance.html">$maxDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/minDistance.html">$minDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/polygon.html">$polygon</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/uniqueDocs.html">$uniqueDocs</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-array.html">Array Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/all.html">$all</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/elemMatch.html">$elemMatch (query)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/size.html">$size</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-bitwise.html">Bitwise Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAllClear.html">$bitsAllClear</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAllSet.html">$bitsAllSet</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAnyClear.html">$bitsAnyClear</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAnySet.html">$bitsAnySet</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/projection.html">Projection Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/projection/positional.html">$ (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/elemMatch.html">$elemMatch (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/meta.html">$meta</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/slice.html">$slice (projection)</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/update.html">Update Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/update-field.html">Field Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/currentDate.html">$currentDate</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/inc.html">$inc</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/min.html">$min</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/max.html">$max</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/mul.html">$mul</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/rename.html">$rename</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/set.html">$set</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/setOnInsert.html">$setOnInsert</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/unset.html">$unset</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/update-array.html">Array Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional.html">$ (update)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional-all.html">$[]</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional-filtered.html">$[&lt;identifier&gt;]</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/addToSet.html">$addToSet</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pop.html">$pop</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pull.html">$pull</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/push.html">$push</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pullAll.html">$pullAll</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/each.html">$each</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/position.html">$position</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/slice.html">$slice</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/sort.html">$sort</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/update-bitwise.html">Bitwise Update Operator</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/bit.html">$bit</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation-pipeline.html">Aggregation Pipeline Stages</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/addFields.html">$addFields (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/bucket.html">$bucket (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/bucketAuto.html">$bucketAuto (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/collStats.html">$collStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/count.html">$count (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/currentOp.html">$currentOp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/facet.html">$facet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/geoNear.html">$geoNear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/graphLookup.html">$graphLookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/group.html">$group (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexStats.html">$indexStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/limit.html">$limit (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/listLocalSessions.html">$listLocalSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/listSessions.html">$listSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lookup.html">$lookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/match.html">$match (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/merge.html">$merge (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/out.html">$out (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/planCacheStats.html">$planCacheStats</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/project.html">$project (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/redact.html">$redact (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/replaceRoot.html">$replaceRoot (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/replaceWith.html">$replaceWith (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sample.html">$sample (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/set.html">$set (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/skip.html">$skip (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sort.html">$sort (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sortByCount.html">$sortByCount (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/unset.html">$unset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/unwind.html">$unwind (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation.html">Aggregation Pipeline Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/abs.html">$abs (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/acos.html">$acos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/acosh.html">$acosh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/add.html">$add (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/addToSet.html">$addToSet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/allElementsTrue.html">$allElementsTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/and.html">$and (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/anyElementTrue.html">$anyElementTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/arrayElemAt.html">$arrayElemAt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/arrayToObject.html">$arrayToObject (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/asin.html">$asin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/asinh.html">$asinh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atan.html">$atan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atan2.html">$atan2 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atanh.html">$atanh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/avg.html">$avg (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ceil.html">$ceil (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cmp.html">$cmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/concat.html">$concat (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/concatArrays.html">$concatArrays (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cond.html">$cond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/convert.html">$convert (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cos.html">$cos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateFromParts.html">$dateFromParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateToParts.html">$dateToParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateFromString.html">$dateFromString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateToString.html">$dateToString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfMonth.html">$dayOfMonth (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfWeek.html">$dayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfYear.html">$dayOfYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/degreesToRadians.html">$degreesToRadians (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/divide.html">$divide (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/eq.html">$eq (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/exp.html">$exp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/filter.html">$filter (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/first.html">$first (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/floor.html">$floor (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/gt.html">$gt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/gte.html">$gte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/hour.html">$hour (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ifNull.html">$ifNull (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/in.html">$in (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfArray.html">$indexOfArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfBytes.html">$indexOfBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfCP.html">$indexOfCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isArray.html">$isArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoDayOfWeek.html">$isoDayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoWeek.html">$isoWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoWeekYear.html">$isoWeekYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/last.html">$last (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/let.html">$let (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/literal.html">$literal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ln.html">$ln (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/log.html">$log (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/log10.html">$log10 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lt.html">$lt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lte.html">$lte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ltrim.html">$ltrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/map.html">$map (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/max.html">$max (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/mergeObjects.html">$mergeObjects (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/meta.html">$meta (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/min.html">$min (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/millisecond.html">$millisecond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/minute.html">$minute (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/mod.html">$mod (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/month.html">$month (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/multiply.html">$multiply (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ne.html">$ne (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/not.html">$not (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/objectToArray.html">$objectToArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/or.html">$or (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/pow.html">$pow (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/push.html">$push (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/radiansToDegrees.html">$radiansToDegrees (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/range.html">$range (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/reduce.html">$reduce (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexFind.html">$regexFind (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexFindAll.html">$regexFindAll (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexMatch.html">$regexMatch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/reverseArray.html">$reverseArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/round.html">$round (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/rtrim.html">$rtrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/second.html">$second (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setDifference.html">$setDifference (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setEquals.html">$setEquals (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setIntersection.html">$setIntersection (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setIsSubset.html">$setIsSubset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setUnion.html">$setUnion (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/size.html">$size (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sin.html">$sin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/slice.html">$slice (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/split.html">$split (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sqrt.html">$sqrt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/stdDevPop.html">$stdDevPop (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/stdDevSamp.html">$stdDevSamp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strcasecmp.html">$strcasecmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strLenBytes.html">$strLenBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strLenCP.html">$strLenCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substr.html">$substr (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substrBytes.html">$substrBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substrCP.html">$substrCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/subtract.html">$subtract (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sum.html">$sum (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/switch.html">$switch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/tan.html">$tan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toBool.html">$toBool (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDate.html">$toDate (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDecimal.html">$toDecimal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDouble.html">$toDouble(aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toInt.html">$toInt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toLong.html">$toLong (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toObjectId.html">$toObjectId (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toString.html">$toString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toLower.html">$toLower (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toUpper.html">$toUpper (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/trim.html">$trim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/trunc.html">$trunc (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/type.html">$type (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/week.html">$week (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/year.html">$year (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/zip.html">$zip (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/query-modifier.html">Query Modifiers</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/meta/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/explain.html">$explain</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/hint.html">$hint</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/max.html">$max</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/maxTimeMS.html">$maxTimeMS</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/min.html">$min</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/orderby.html">$orderby</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/query.html">$query</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/returnKey.html">$returnKey</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/showDiskLoc.html">$showDiskLoc</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/natural.html">$natural</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../command.html">Database Commands</a><ul><li class="toctree-l3"><a class="reference internal" href="../command/nav-aggregation.html">Aggregation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/aggregate.html">aggregate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/count.html">count</a></li><li class="toctree-l4"><a class="reference internal" href="../command/distinct.html">distinct</a></li><li class="toctree-l4"><a class="reference internal" href="../command/mapReduce.html">mapReduce</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-geospatial.html">Geospatial Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/geoSearch.html">geoSearch</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-crud.html">Query and Write Operation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/delete.html">delete</a></li><li class="toctree-l4"><a class="reference internal" href="../command/find.html">find</a></li><li class="toctree-l4"><a class="reference internal" href="../command/findAndModify.html">findAndModify</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getLastError.html">getLastError</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getMore.html">getMore</a></li><li class="toctree-l4"><a class="reference internal" href="../command/insert.html">insert</a></li><li class="toctree-l4"><a class="reference internal" href="../command/resetError.html">resetError</a></li><li class="toctree-l4"><a class="reference internal" href="../command/update.html">update</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-plan-cache.html">Query Plan Cache Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/planCacheClear.html">planCacheClear</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheClearFilters.html">planCacheClearFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListFilters.html">planCacheListFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListPlans.html">planCacheListPlans</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListQueryShapes.html">planCacheListQueryShapes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheSetFilter.html">planCacheSetFilter</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-authentication.html">Authentication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/authenticate.html">authenticate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getnonce.html">getnonce</a></li><li class="toctree-l4"><a class="reference internal" href="../command/logout.html">logout</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-user-management.html">User Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/createUser.html">createUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropAllUsersFromDatabase.html">dropAllUsersFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropUser.html">dropUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantRolesToUser.html">grantRolesToUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokeRolesFromUser.html">revokeRolesFromUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateUser.html">updateUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/usersInfo.html">usersInfo</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-role-management.html">Role Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/createRole.html">createRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropRole.html">dropRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropAllRolesFromDatabase.html">dropAllRolesFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantPrivilegesToRole.html">grantPrivilegesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantRolesToRole.html">grantRolesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/invalidateUserCache.html">invalidateUserCache</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokePrivilegesFromRole.html">revokePrivilegesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokeRolesFromRole.html">revokeRolesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/rolesInfo.html">rolesInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateRole.html">updateRole</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-replication.html">Replication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/applyOps.html">applyOps</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isMaster.html">isMaster</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetAbortPrimaryCatchUp.html">replSetAbortPrimaryCatchUp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetFreeze.html">replSetFreeze</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetGetConfig.html">replSetGetConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetGetStatus.html">replSetGetStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetInitiate.html">replSetInitiate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetMaintenance.html">replSetMaintenance</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetReconfig.html">replSetReconfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetResizeOplog.html">replSetResizeOplog</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetStepDown.html">replSetStepDown</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetSyncFrom.html">replSetSyncFrom</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-sharding.html">Sharding Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/addShard.html">addShard</a></li><li class="toctree-l4"><a class="reference internal" href="../command/addShardToZone.html">addShardToZone</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStart.html">balancerStart</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStatus.html">balancerStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStop.html">balancerStop</a></li><li class="toctree-l4"><a class="reference internal" href="../command/checkShardingIndex.html">checkShardingIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../command/clearJumboFlag.html">clearJumboFlag</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cleanupOrphaned.html">cleanupOrphaned</a></li><li class="toctree-l4"><a class="reference internal" href="../command/enableSharding.html">enableSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../command/flushRouterConfig.html">flushRouterConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getShardMap.html">getShardMap</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getShardVersion.html">getShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isdbgrid.html">isdbgrid</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listShards.html">listShards</a></li><li class="toctree-l4"><a class="reference internal" href="../command/medianKey.html">medianKey</a></li><li class="toctree-l4"><a class="reference internal" href="../command/moveChunk.html">moveChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../command/movePrimary.html">movePrimary</a></li><li class="toctree-l4"><a class="reference internal" href="../command/mergeChunks.html">mergeChunks</a></li><li class="toctree-l4"><a class="reference internal" href="../command/removeShard.html">removeShard</a></li><li class="toctree-l4"><a class="reference internal" href="../command/removeShardFromZone.html">removeShardFromZone</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setShardVersion.html">setShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardCollection.html">shardCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardingState.html">shardingState</a></li><li class="toctree-l4"><a class="reference internal" href="../command/split.html">split</a></li><li class="toctree-l4"><a class="reference internal" href="../command/splitChunk.html">splitChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../command/splitVector.html">splitVector</a></li><li class="toctree-l4"><a class="reference internal" href="../command/unsetSharding.html">unsetSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateZoneKeyRange.html">updateZoneKeyRange</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-sessions.html">Sessions Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/abortTransaction.html">abortTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../command/commitTransaction.html">commitTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../command/endSessions.html">endSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killAllSessions.html">killAllSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killAllSessionsByPattern.html">killAllSessionsByPattern</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killSessions.html">killSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/refreshSessions.html">refreshSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/startSession.html">startSession</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-administration.html">Administration Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/clean.html">clean</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cloneCollection.html">cloneCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cloneCollectionAsCapped.html">cloneCollectionAsCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../command/collMod.html">collMod</a></li><li class="toctree-l4"><a class="reference internal" href="../command/compact.html">compact</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connPoolSync.html">connPoolSync</a></li><li class="toctree-l4"><a class="reference internal" href="../command/convertToCapped.html">convertToCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../command/create.html">create</a></li><li class="toctree-l4"><a class="reference internal" href="../command/createIndexes.html">createIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/currentOp.html">currentOp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/drop.html">drop</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropDatabase.html">dropDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropConnections.html">dropConnections</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropIndexes.html">dropIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/filemd5.html">filemd5</a></li><li class="toctree-l4"><a class="reference internal" href="../command/fsync.html">fsync</a></li><li class="toctree-l4"><a class="reference internal" href="../command/fsyncUnlock.html">fsyncUnlock</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getParameter.html">getParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killCursors.html">killCursors</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killOp.html">killOp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listCollections.html">listCollections</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listDatabases.html">listDatabases</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listIndexes.html">listIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/logRotate.html">logRotate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/reIndex.html">reIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../command/renameCollection.html">renameCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setFeatureCompatibilityVersion.html">setFeatureCompatibilityVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setParameter.html">setParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shutdown.html">shutdown</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-diagnostic.html">Diagnostic Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/availableQueryOptions.html">availableQueryOptions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/buildInfo.html">buildInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/collStats.html">collStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connPoolStats.html">connPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connectionStatus.html">connectionStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cursorInfo.html">cursorInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dataSize.html">dataSize</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dbHash.html">dbHash</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dbStats.html">dbStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/diagLogging.html">diagLogging</a></li><li class="toctree-l4"><a class="reference internal" href="../command/driverOIDTest.html">driverOIDTest</a></li><li class="toctree-l4"><a class="reference internal" href="../command/explain.html">explain</a></li><li class="toctree-l4"><a class="reference internal" href="../command/features.html">features</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getCmdLineOpts.html">getCmdLineOpts</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getLog.html">getLog</a></li><li class="toctree-l4"><a class="reference internal" href="../command/hostInfo.html">hostInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isSelf.html">isSelf</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listCommands.html">listCommands</a></li><li class="toctree-l4"><a class="reference internal" href="../command/netstat.html">netstat</a></li><li class="toctree-l4"><a class="reference internal" href="../command/ping.html">ping</a></li><li class="toctree-l4"><a class="reference internal" href="../command/profile.html">profile</a></li><li class="toctree-l4"><a class="reference internal" href="../command/serverStatus.html">serverStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardConnPoolStats.html">shardConnPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/top.html">top</a></li><li class="toctree-l4"><a class="reference internal" href="../command/validate.html">validate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/whatsmyuri.html">whatsmyuri</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-free-monitoring.html">Free Monitoring Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/getFreeMonitoringStatus.html">getFreeMonitoringStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setFreeMonitoring.html">setFreeMonitoring</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-auditing.html">System Events Auditing Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/logApplicationMessage.html">logApplicationMessage</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../method.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../method/js-collection.html">Collection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.aggregate.html">db.collection.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.bulkWrite.html">db.collection.bulkWrite()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.copyTo.html">db.collection.copyTo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.count.html">db.collection.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.countDocuments.html">db.collection.countDocuments()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.estimatedDocumentCount.html">db.collection.estimatedDocumentCount()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.createIndex.html">db.collection.createIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.createIndexes.html">db.collection.createIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dataSize.html">db.collection.dataSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.deleteOne.html">db.collection.deleteOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.deleteMany.html">db.collection.deleteMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.distinct.html">db.collection.distinct()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.drop.html">db.collection.drop()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dropIndex.html">db.collection.dropIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dropIndexes.html">db.collection.dropIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.ensureIndex.html">db.collection.ensureIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.explain.html">db.collection.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.find.html">db.collection.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findAndModify.html">db.collection.findAndModify()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOne.html">db.collection.findOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndDelete.html">db.collection.findOneAndDelete()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndReplace.html">db.collection.findOneAndReplace()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndUpdate.html">db.collection.findOneAndUpdate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getIndexes.html">db.collection.getIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getShardDistribution.html">db.collection.getShardDistribution()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getShardVersion.html">db.collection.getShardVersion()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insert.html">db.collection.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insertOne.html">db.collection.insertOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insertMany.html">db.collection.insertMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.isCapped.html">db.collection.isCapped()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.latencyStats.html">db.collection.latencyStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.mapReduce.html">db.collection.mapReduce()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.reIndex.html">db.collection.reIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.remove.html">db.collection.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.renameCollection.html">db.collection.renameCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.replaceOne.html">db.collection.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.save.html">db.collection.save()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.stats.html">db.collection.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.storageSize.html">db.collection.storageSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.totalIndexSize.html">db.collection.totalIndexSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.totalSize.html">db.collection.totalSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.update.html">db.collection.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.updateOne.html">db.collection.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.updateMany.html">db.collection.updateMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.watch.html">db.collection.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.validate.html">db.collection.validate()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-cursor.html">Cursor Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/cursor.addOption.html">cursor.addOption()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.allowPartialResults.html">cursor.allowPartialResults()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.batchSize.html">cursor.batchSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.close.html">cursor.close()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.isClosed.html">cursor.isClosed()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.collation.html">cursor.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.comment.html">cursor.comment()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.count.html">cursor.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.explain.html">cursor.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.forEach.html">cursor.forEach()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.hasNext.html">cursor.hasNext()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.hint.html">cursor.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.isExhausted.html">cursor.isExhausted()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.itcount.html">cursor.itcount()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.limit.html">cursor.limit()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.map.html">cursor.map()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.max.html">cursor.max()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.maxTimeMS.html">cursor.maxTimeMS()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.min.html">cursor.min()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.next.html">cursor.next()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.noCursorTimeout.html">cursor.noCursorTimeout()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.objsLeftInBatch.html">cursor.objsLeftInBatch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.pretty.html">cursor.pretty()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.readConcern.html">cursor.readConcern()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.readPref.html">cursor.readPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.returnKey.html">cursor.returnKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.showRecordId.html">cursor.showRecordId()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.size.html">cursor.size()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.skip.html">cursor.skip()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.sort.html">cursor.sort()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.tailable.html">cursor.tailable()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.toArray.html">cursor.toArray()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-database.html">Database Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.adminCommand.html">db.adminCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.aggregate.html">db.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.cloneCollection.html">db.cloneCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.cloneDatabase.html">db.cloneDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.commandHelp.html">db.commandHelp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.copyDatabase.html">db.copyDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createCollection.html">db.createCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createView.html">db.createView()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.currentOp.html">db.currentOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropDatabase.html">db.dropDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.eval.html">db.eval()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.fsyncLock.html">db.fsyncLock()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.fsyncUnlock.html">db.fsyncUnlock()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollection.html">db.getCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollectionInfos.html">db.getCollectionInfos()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollectionNames.html">db.getCollectionNames()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLastError.html">db.getLastError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLastErrorObj.html">db.getLastErrorObj()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLogComponents.html">db.getLogComponents()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getMongo.html">db.getMongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getName.html">db.getName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getProfilingLevel.html">db.getProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getProfilingStatus.html">db.getProfilingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getReplicationInfo.html">db.getReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getSiblingDB.html">db.getSiblingDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.help.html">db.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.hostInfo.html">db.hostInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.isMaster.html">db.isMaster()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.killOp.html">db.killOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.listCommands.html">db.listCommands()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.logout.html">db.logout()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printCollectionStats.html">db.printCollectionStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printReplicationInfo.html">db.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printShardingStatus.html">db.printShardingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printSlaveReplicationInfo.html">db.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.resetError.html">db.resetError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.runCommand.html">db.runCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverBuildInfo.html">db.serverBuildInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverCmdLineOpts.html">db.serverCmdLineOpts()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverStatus.html">db.serverStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.setLogLevel.html">db.setLogLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.setProfilingLevel.html">db.setProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.shutdownServer.html">db.shutdownServer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.stats.html">db.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.version.html">db.version()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.watch.html">db.watch()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-plan-cache.html">Query Plan Cache Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getPlanCache.html">db.collection.getPlanCache()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.clear.html">PlanCache.clear()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.clearPlansByQuery.html">PlanCache.clearPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.getPlansByQuery.html">PlanCache.getPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.help.html">PlanCache.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.listQueryShapes.html">PlanCache.listQueryShapes()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-bulk.html">Bulk Operation Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.initializeOrderedBulkOp.html">db.collection.initializeOrderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.initializeUnorderedBulkOp.html">db.collection.initializeUnorderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.html">Bulk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.execute.html">Bulk.execute()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.html">Bulk.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.arrayFilters.html">Bulk.find.arrayFilters()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.collation.html">Bulk.find.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.hint.html">Bulk.find.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.remove.html">Bulk.find.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.removeOne.html">Bulk.find.removeOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.replaceOne.html">Bulk.find.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.updateOne.html">Bulk.find.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.update.html">Bulk.find.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.upsert.html">Bulk.find.upsert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.getOperations.html">Bulk.getOperations()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.insert.html">Bulk.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.tojson.html">Bulk.tojson()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.toString.html">Bulk.toString()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-user-management.html">User Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.auth.html">db.auth()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.changeUserPassword.html">db.changeUserPassword()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createUser.html">db.createUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropUser.html">db.dropUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropAllUsers.html">db.dropAllUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getUser.html">db.getUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getUsers.html">db.getUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantRolesToUser.html">db.grantRolesToUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.removeUser.html">db.removeUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokeRolesFromUser.html">db.revokeRolesFromUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.updateUser.html">db.updateUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/passwordPrompt.html">passwordPrompt()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-role-management.html">Role Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.createRole.html">db.createRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropRole.html">db.dropRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropAllRoles.html">db.dropAllRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getRole.html">db.getRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getRoles.html">db.getRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantPrivilegesToRole.html">db.grantPrivilegesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokePrivilegesFromRole.html">db.revokePrivilegesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantRolesToRole.html">db.grantRolesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokeRolesFromRole.html">db.revokeRolesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.updateRole.html">db.updateRole()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-replication.html">Replication Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/rs.add.html">rs.add()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.addArb.html">rs.addArb()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.conf.html">rs.conf()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.freeze.html">rs.freeze()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.help.html">rs.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.initiate.html">rs.initiate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.printReplicationInfo.html">rs.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.printSlaveReplicationInfo.html">rs.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.reconfig.html">rs.reconfig()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.remove.html">rs.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.slaveOk.html">rs.slaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.status.html">rs.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.stepDown.html">rs.stepDown()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.syncFrom.html">rs.syncFrom()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-sharding.html">Sharding Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShard.html">sh.addShard()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShardTag.html">sh.addShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShardToZone.html">sh.addShardToZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addTagRange.html">sh.addTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.disableBalancing.html">sh.disableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableBalancing.html">sh.enableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.disableAutoSplit.html">sh.disableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableAutoSplit.html">sh.enableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableSharding.html">sh.enableSharding()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.getBalancerHost.html">sh.getBalancerHost()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.getBalancerState.html">sh.getBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeTagRange.html">sh.removeTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeRangeFromZone.html">sh.removeRangeFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.help.html">sh.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.isBalancerRunning.html">sh.isBalancerRunning()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.moveChunk.html">sh.moveChunk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeShardTag.html">sh.removeShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeShardFromZone.html">sh.removeShardFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.setBalancerState.html">sh.setBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.shardCollection.html">sh.shardCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.splitAt.html">sh.splitAt()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.splitFind.html">sh.splitFind()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.startBalancer.html">sh.startBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.status.html">sh.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.stopBalancer.html">sh.stopBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForBalancer.html">sh.waitForBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForBalancerOff.html">sh.waitForBalancerOff()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForPingChange.html">sh.waitForPingChange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.updateZoneKeyRange.html">sh.updateZoneKeyRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/convertShardKeyToHashed.html">convertShardKeyToHashed</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-free-monitoring.html">Free Monitoring Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.disableFreeMonitoring.html">db.disableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.enableFreeMonitoring.html">db.enableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getFreeMonitoringStatus.html">db.getFreeMonitoringStatus</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-constructor.html">Object Constructors and Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/BulkWriteResult.html">BulkWriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Date.html">Date()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.html">ObjectId</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.getTimestamp.html">ObjectId.getTimestamp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.toString.html">ObjectId.toString()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.valueOf.html">ObjectId.valueOf()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/UUID.html">UUID()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.html">WriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.hasWriteError.html">WriteResult.hasWriteError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.hasWriteConcernError.html">WriteResult.hasWriteConcernError()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-connection.html">Connection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/connect.html">connect()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.html">Mongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getDB.html">Mongo.getDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getReadPrefMode.html">Mongo.getReadPrefMode()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getReadPrefTagSet.html">Mongo.getReadPrefTagSet()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.isCausalConsistency.html">Mongo.isCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setCausalConsistency.html">Mongo.setCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setReadPref.html">Mongo.setReadPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setSlaveOk.html">Mongo.setSlaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.startSession.html">Mongo.startSession()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.watch.html">Mongo.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Session.html">Session</a><ul><li class="toctree-l5"><a class="reference internal" href="../method/Session.abortTransaction.html">Session.abortTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../method/Session.commitTransaction.html">Session.commitTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../method/Session.startTransaction.html">Session.startTransaction()</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../method/SessionOptions.html">SessionOptions</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-native.html">Native Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/cat.html">cat()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cd.html">cd()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/copyDbpath.html">copyDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getHostName.html">getHostName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getMemInfo.html">getMemInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/hostname.html">hostname()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/isInteractive.html">isInteractive()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/listFiles.html">listFiles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/load.html">load()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ls.html">ls()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/md5sumFile.html">md5sumFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/mkdir.html">mkdir()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/pwd.html">pwd()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/quit.html">quit()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/removeFile.html">removeFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/resetDbpath.html">resetDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sleep.html">sleep()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/setVerboseShell.html">setVerboseShell()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/version.html">version()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/isWindows.html">_isWindows()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rand.html">_rand()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-client-side-field-level-encryption.html">Client-Side Field Level Encryption Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/getKeyVault.html">getKeyVault()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.createKey.html">KeyVault.createKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.deleteKey.html">KeyVault.deleteKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKey.html">KeyVault.getKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKeys.html">KeyVault.getKeys()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.addKeyAlternateName.html">KeyVault.addKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.removeKeyAlternateName.html">KeyVault.removeKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKeyByAltName.html">KeyVault.getKeyByAltName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getClientEncryption.html">getClientEncryption()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ClientEncryption.encrypt.html">ClientEncryption.encrypt()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ClientEncryption.decrypt.html">ClientEncryption.decrypt()</a></li></ul></li></ul></li><li class="toctree-l2 current"><a class="reference internal" href="../program.html">MongoDB Package Components</a><ul class="current"><li class="toctree-l3"><a class="reference internal" href="mongod.html"><code class="docutils literal"><span class="pre">mongod</span></code></a></li><li class="toctree-l3 current"><a class="reference internal current" href=""><code class="docutils literal"><span class="pre">mongos</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongo.html"><code class="docutils literal"><span class="pre">mongo</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongod.exe.html"><code class="docutils literal"><span class="pre">mongod.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongos.exe.html"><code class="docutils literal"><span class="pre">mongos.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongodump.html"><code class="docutils literal"><span class="pre">mongodump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongorestore.html"><code class="docutils literal"><span class="pre">mongorestore</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="bsondump.html"><code class="docutils literal"><span class="pre">bsondump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoimport.html"><code class="docutils literal"><span class="pre">mongoimport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoexport.html"><code class="docutils literal"><span class="pre">mongoexport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongostat.html"><code class="docutils literal"><span class="pre">mongostat</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongotop.html"><code class="docutils literal"><span class="pre">mongotop</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoreplay.html"><code class="docutils literal"><span class="pre">mongoreplay</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoldap.html"><code class="docutils literal"><span class="pre">mongoldap</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongofiles.html"><code class="docutils literal"><span class="pre">mongofiles</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="install_compass.html"><code class="docutils literal"><span class="pre">install_compass</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../configuration-options.html">Configuration File Options</a><ul><li class="toctree-l3"><a class="reference internal" href="../expansion-directives.html">Externally Sourced Configuration File Values</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-command-line-options-to-yaml.html">Convert Command-Line Options to YAML</a></li><li class="toctree-l3"><a class="reference internal" href="../configuration-file-settings-command-line-options-mapping.html">Configuration File Settings and Command-Line Options Mapping</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../parameters.html">MongoDB Server Parameters</a></li><li class="toctree-l2"><a class="reference internal" href="../limits.html">MongoDB Limits and Thresholds</a></li><li class="toctree-l2"><a class="reference internal" href="../explain-results.html">Explain Results</a></li><li class="toctree-l2"><a class="reference internal" href="../system-collections.html">System Collections</a></li><li class="toctree-l2"><a class="reference internal" href="../connection-string.html">Connection String URI Format</a></li><li class="toctree-l2"><a class="reference internal" href="../collation.html">Collation</a><ul><li class="toctree-l3"><a class="reference internal" href="../collation-locales-defaults.html">Collation Locales and Default Parameters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../mongodb-wire-protocol.html">MongoDB Wire Protocol</a></li><li class="toctree-l2"><a class="reference internal" href="../log-messages.html">Log Messages</a></li><li class="toctree-l2"><a class="reference internal" href="../exit-codes.html">Exit Codes and Statuses</a></li><li class="toctree-l2"><a class="reference internal" href="../glossary.html">Glossary</a></li><li class="toctree-l2"><a class="reference internal" href="../default-mongodb-port.html">Default MongoDB Port</a></li><li class="toctree-l2"><a class="reference internal" href="../server-sessions.html">Server Sessions</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../release-notes.html">Release Notes</a><ul><li class="toctree-l2"><a class="reference internal" href="../../release-notes/4.2.html">Release Notes for MongoDB 4.2</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-compatibility.html">Compatibility Changes in MongoDB 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-standalone.html">Upgrade a Standalone to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-replica-set.html">Upgrade a Replica Set to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-downgrade.html">Downgrade 4.2 to 4.0</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-standalone.html">Downgrade 4.2 Standalone to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-replica-set.html">Downgrade 4.2 Replica Set to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-sharded-cluster.html">Downgrade 4.2 Sharded Cluster to 4.0</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-changelog.html">4.2 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/4.0.html">Release Notes for MongoDB 4.0</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-compatibility.html">Compatibility Changes in MongoDB 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-standalone.html">Upgrade a Standalone to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-replica-set.html">Upgrade a Replica Set to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-standalone.html">Downgrade 4.0 Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-replica-set.html">Downgrade 4.0 Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-sharded-cluster.html">Downgrade 4.0 Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-changelog.html">4.0 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.6.html">Release Notes for MongoDB 3.6</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-changelog.html">3.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-compatibility.html">Compatibility Changes in MongoDB 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-standalone.html">Upgrade a Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-replica-set.html">Upgrade a Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-standalone.html">Downgrade 3.6 Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-replica-set.html">Downgrade 3.6 Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-sharded-cluster.html">Downgrade 3.6 Sharded Cluster to 3.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.4.html">Release Notes for MongoDB 3.4</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-changelog.html">3.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-compatibility.html">Compatibility Changes in MongoDB 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-standalone.html">Upgrade a Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-replica-set.html">Upgrade a Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-downgrade.html">Downgrade MongoDB 3.4 to 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-standalone.html">Downgrade 3.4 Standalone to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-replica-set.html">Downgrade 3.4 Replica Set to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-sharded-cluster.html">Downgrade 3.4 Sharded Cluster to 3.2</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.2.html">Release Notes for MongoDB 3.2</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-changelog.html">3.2 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-compatibility.html">Compatibility Changes in MongoDB 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.2-javascript.html">JavaScript Changes in MongoDB 3.2</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-upgrade.html">Upgrade MongoDB to 3.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-downgrade.html">Downgrade MongoDB from 3.2</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.0.html">Release Notes for MongoDB 3.0</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-changelog.html">3.0 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-compatibility.html">Compatibility Changes in MongoDB 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-upgrade.html">Upgrade MongoDB to 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-scram.html">Upgrade to SCRAM</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-downgrade.html">Downgrade MongoDB from 3.0</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.6.html">Release Notes for MongoDB 2.6</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-changelog.html">2.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-compatibility.html">Compatibility Changes in MongoDB 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-upgrade.html">Upgrade MongoDB to 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-upgrade-authorization.html">Upgrade User Authorization Data to 2.6 Format</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-downgrade.html">Downgrade MongoDB from 2.6</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.4.html">Release Notes for MongoDB 2.4</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-changelog.html">2.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-javascript.html">JavaScript Changes in MongoDB 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-upgrade.html">Upgrade MongoDB to 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-index-types.html">Compatibility and Index Type Changes in MongoDB 2.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.2.html">Release Notes for MongoDB 2.2</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.0.html">Release Notes for MongoDB 2.0</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.8.html">Release Notes for MongoDB 1.8</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.6.html">Release Notes for MongoDB 1.6</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.4.html">Release Notes for MongoDB 1.4</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.2.html">Release Notes for MongoDB 1.2.x</a></li><li class="toctree-l2"><a class="reference internal" href="../versioning.html">MongoDB Versioning</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../support.html">Technical Support</a></li></ul>


    </div>
  </div>
           
         </aside>

   </div>

    <div id="main-column" class="main-column">

    <span id="showNav" class="showNav">Navigation</span>

      
        <div class="document">
            <div class="documentwrapper"><div class="bodywrapper">
              <div class="body" data-pagename="reference/program/mongos">
                   <a class="edit-link" href="https://github.com/mongodb/docs/blob/v4.2/source/reference/program/mongos.txt" target="_blank" title="Edit reference/program/mongos.txt on GitHub">
    
      <span class="icon-edit"></span>
    
  </a>
                

                
  <div class="bc">
    
      <ul>
          <li><a href="../../reference.html">Reference</a><span class="bcpoint"> > </span></li>
            
          <li><a href="../program.html">MongoDB Package Components</a><span class="bcpoint"> > </span></li>
            <li><code class="docutils literal"><span class="pre">mongos</span></code></li> 
      </ul>
    
    
  </div>
                
                  <div class="section" id="mongos">
<span id="id1"></span><h1><code class="docutils literal"><span class="pre">mongos</span></code><a class="headerlink" href="#mongos" title="Permalink to this headline">¶</a></h1>
<div class="contents singlecol local topic" id="on-this-page">
<p class="topic-title first">On this page</p>
<ul class="simple">
<li><a class="reference internal" href="#synopsis" id="id12">Synopsis</a></li>
<li><a class="reference internal" href="#considerations" id="id13">Considerations</a></li>
<li><a class="reference internal" href="#options" id="id14">Options</a></li>
</ul>
</div>
<div class="section" id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p>For a <a class="reference internal" href="../../sharding.html"><span class="doc">sharded cluster</span></a>, the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>
instances provide the interface between the client applications and the
sharded cluster. The <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances route queries and
write operations to the shards. From the perspective of the
application, a <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance behaves identically to
any other MongoDB instance.</p>
</div>
<div class="section" id="considerations">
<h2>Considerations<a class="headerlink" href="#considerations" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Never change the name of the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> binary.</li>
<li>Starting in version 4.0, MongoDB disables support for TLS 1.0
encryption on systems where TLS 1.1+ is available. For
more details, see <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</li>
<li>Starting in MongoDB 4.0, the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> binary will crash when
attempting to connect to <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances whose
<a class="reference internal" href="../command/setFeatureCompatibilityVersion.html#view-fcv"><span class="std std-ref">feature compatibility version (fCV)</span></a> is greater than
that of the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>. For example, you cannot connect
a MongoDB 4.0 version <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> to a 4.2
sharded cluster with <a class="reference internal" href="../command/setFeatureCompatibilityVersion.html#view-fcv"><span class="std std-ref">fCV</span></a> set to 4.2. You
can, however, connect a MongoDB 4.0 version
<a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> to a 4.2 sharded cluster with <a class="reference internal" href="../command/setFeatureCompatibilityVersion.html#view-fcv"><span class="std std-ref">fCV</span></a> set to 4.0.</li>
</ul>
</div>
<div class="section" id="options">
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../configuration-file-settings-command-line-options-mapping.html#conf-file-command-line-mapping"><span class="std std-ref">Configuration File Settings and Command-Line Options Mapping</span></a></p>
</div>
<dl class="hidden binary">
<dt id="bin.mongos">
<code class="descname">mongos</code><a class="headerlink" href="#bin.mongos" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<div class="admonition-starting-in-version-4-2 admonition">
<p class="first admonition-title">Starting in version 4.2</p>
<ul class="last simple">
<li>MongoDB deprecates the SSL options and insteads adds new
corresponding TLS options.</li>
<li>MongoDB adds
<a class="reference internal" href="#cmdoption-mongos-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a>/<a class="reference internal" href="../configuration-options.html#net.tls.clusterCAFile" title="net.tls.clusterCAFile"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.tls.clusterCAFile</span></code></a>. (Also availalbe
in 3.4.18+, 3.6.9+, 4.0.3+)</li>
</ul>
</div>
<div class="section" id="core-options">
<h3>Core Options<a class="headerlink" href="#core-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongos-help">
<code class="descname">--help</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">-h</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns information on the options and use of <strong class="program">mongos</strong>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-version">
<code class="descname">--version</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-version" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the <strong class="program">mongos</strong> release number.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-config">
<code class="descname">--config</code><code class="descclassname"> &lt;filename&gt;</code><code class="descclassname">, </code><code class="descname">-f</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-config" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies a configuration file for runtime configuration options. The
configuration file is the preferred method for runtime configuration of
<strong class="program">mongos</strong>. The options are equivalent to the command-line
configuration options. See <a class="reference internal" href="../configuration-options.html"><span class="doc">Configuration File Options</span></a> for
more information.</p>
<p>Ensure the configuration file uses ASCII encoding. The <strong class="program">mongos</strong>
instance does not support configuration files with non-ASCII encoding,
including UTF-8.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-configexpand">
<code class="descname">--configExpand</code><code class="descclassname"> &lt;none|rest|exec&gt;</code><a class="headerlink" href="#cmdoption-mongos-configexpand" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: none</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Enables using <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Expansion Directives</span></a>
in configuration files. Expansion directives allow you to set
externally sourced values for configuration file options.</p>
<p><a class="reference internal" href="#cmdoption-mongos-configexpand"><code class="xref std std-option docutils literal"><span class="pre">--configExpand</span></code></a> supports the following expansion directives:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">none</span></code></td>
<td>Default. <strong class="program">mongos</strong> does not expand expansion directives.
<strong class="program">mongos</strong> fails to start if any configuration file settings
use expansion directives.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">rest</span></code></td>
<td><strong class="program">mongos</strong> expands <code class="docutils literal"><span class="pre">__rest</span></code> expansion directives when
parsing the configuration file.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">exec</span></code></td>
<td><strong class="program">mongos</strong> expands <code class="docutils literal"><span class="pre">__exec</span></code> expansion directives when
parsing the configuration file.</td>
</tr>
</tbody>
</table>
<p>You can specify multiple expansion directives as a comma-separated
list, e.g. <code class="docutils literal"><span class="pre">rest,</span> <span class="pre">exec</span></code>. If the configuration file contains
expansion directives not specified to <a class="reference internal" href="#cmdoption-mongos-configexpand"><code class="xref std std-option docutils literal"><span class="pre">--configExpand</span></code></a>, the <strong class="program">mongos</strong>
returns an error and terminates.</p>
<p>See <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Externally Sourced Configuration File Values</span></a> for configuration files
for more information on expansion directives.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-verbose">
<code class="descname">--verbose</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">-v</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-verbose" title="Permalink to this definition">¶</a></dt>
<dd><p>Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the <code class="docutils literal"><span class="pre">-v</span></code> form by
including the option multiple times, (e.g. <code class="docutils literal"><span class="pre">-vvvvv</span></code>.)</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-quiet">
<code class="descname">--quiet</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-quiet" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs <strong class="program">mongos</strong> in a quiet mode that attempts to limit the amount
of output.</p>
<p>This option suppresses:</p>
<ul class="simple">
<li>output from <a class="reference internal" href="../glossary.html#term-database-command"><span class="xref std std-term">database commands</span></a></li>
<li>replication activity</li>
<li>connection accepted events</li>
<li>connection closed events</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-port">
<code class="descname">--port</code><code class="descclassname"> &lt;port&gt;</code><a class="headerlink" href="#cmdoption-mongos-port" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 27017</p>
<p>The TCP port on which the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance listens for
client connections.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-bind-ip">
<code class="descname">--bind_ip</code><code class="descclassname"> &lt;hostnames|ipaddresses|Unix domain socket paths&gt;</code><a class="headerlink" href="#cmdoption-mongos-bind-ip" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: localhost</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 3.6, <strong class="program">mongos</strong> bind to localhost
by default. See <a class="reference internal" href="../../release-notes/3.6.html#bind-to-localhost"><span class="std std-ref">Default Bind to Localhost</span></a>.</p>
</div>
<p>The hostnames and/or IP addresses and/or full Unix domain socket
paths on which <strong class="program">mongos</strong> should listen for client connections. You
may attach <strong class="program">mongos</strong> to any interface. To bind to multiple
addresses, enter a list of comma-separated values.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,/tmp/mongod.sock</span></code></p>
</div>
<p>You can specify both IPv4 and IPv6 addresses, or hostnames that
resolve to an IPv4 or IPv6 address.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,</span> <span class="pre">2001:0DB8:e132:ba26:0d5c:2774:e7f9:d513</span></code></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If specifying an IPv6 address <em>or</em> a hostname that resolves to an
IPv6 address to <a class="reference internal" href="#cmdoption-mongos-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a>, you must start <strong class="program">mongos</strong> with
<a class="reference internal" href="#cmdoption-mongos-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a> to enable IPv6 support. Specifying an IPv6 address
to <a class="reference internal" href="#cmdoption-mongos-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a> does not enable IPv6 support.</p>
</div>
<p>If specifying a
<a class="reference external" href="https://en.wikipedia.org/w/index.php?title=Link-local_address&amp;oldid=880793020#IPv6">link-local IPv6 address</a>
(<code class="docutils literal"><span class="pre">fe80::/10</span></code>), you must append the
<a class="reference external" href="https://en.wikipedia.org/w/index.php?title=IPv6_address&amp;oldid=877601778#Scoped_literal_IPv6_addresses">zone index</a>
to that address (i.e. <code class="docutils literal"><span class="pre">fe80::&lt;address&gt;%&lt;adapter-name&gt;</span></code>).</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,fe80::a00:27ff:fee0:1fcf%enp0s3</span></code></p>
</div>
<div class="admonition-tip admonition">
<p class="first admonition-title">Tip</p>
<p class="last">When possible, use a logical DNS hostname instead of an ip address,
particularly when configuring replica set members or sharded cluster
members. The use of logical DNS hostnames avoids configuration
changes due to ip address changes.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before binding to a non-localhost (e.g. publicly accessible)
IP address, ensure you have secured your cluster from unauthorized
access. For a complete list of security recommendations, see
<a class="reference internal" href="../../administration/security-checklist.html"><span class="doc">Security Checklist</span></a>. At minimum, consider
<a class="reference internal" href="../../administration/security-checklist.html#checklist-auth"><span class="std std-ref">enabling authentication</span></a> and
<a class="reference internal" href="../../core/security-hardening.html"><span class="doc">hardening network infrastructure</span></a>.</p>
</div>
<p>For more information about IP Binding, refer to the
<a class="reference internal" href="../../core/security-mongodb-configuration.html"><span class="doc">IP Binding</span></a> documentation.</p>
<p>To bind to all IPv4 addresses, enter <code class="docutils literal"><span class="pre">0.0.0.0</span></code>.</p>
<p>To bind to all IPv4 and IPv6 addresses, enter <code class="docutils literal"><span class="pre">::,0.0.0.0</span></code> or
starting in MongoDB 4.2, an asterisk <code class="docutils literal"><span class="pre">&quot;*&quot;</span></code> (enclose the asterisk in
quotes to avoid filename pattern expansion). Alternatively, use the
<a class="reference internal" href="../configuration-options.html#net.bindIpAll" title="net.bindIpAll"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIpAll</span></code></a> setting.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">--bind_ip</span></code> and <code class="docutils literal"><span class="pre">--bind_ip_all</span></code> are mutually exclusive.
Specifying both options causes <strong class="program">mongos</strong> to throw an error and
terminate.</li>
<li>The command-line option <code class="docutils literal"><span class="pre">--bind</span></code> overrides the configuration
file setting <a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a>.</li>
</ul>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-bind-ip-all">
<code class="descname">--bind_ip_all</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-bind-ip-all" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>If specified, the <strong class="program">mongos</strong> instance binds to all IPv4
addresses (i.e. <code class="docutils literal"><span class="pre">0.0.0.0</span></code>). If <strong class="program">mongos</strong> starts with
<a class="reference internal" href="#cmdoption-mongos-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a>, <a class="reference internal" href="#cmdoption-mongos-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> also binds to all IPv6 addresses
(i.e. <code class="docutils literal"><span class="pre">::</span></code>).</p>
<p><strong class="program">mongos</strong> only supports IPv6 if started with <a class="reference internal" href="#cmdoption-mongos-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a>. Specifying
<a class="reference internal" href="#cmdoption-mongos-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> alone does not enable IPv6 support.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before binding to a non-localhost (e.g. publicly accessible)
IP address, ensure you have secured your cluster from unauthorized
access. For a complete list of security recommendations, see
<a class="reference internal" href="../../administration/security-checklist.html"><span class="doc">Security Checklist</span></a>. At minimum, consider
<a class="reference internal" href="../../administration/security-checklist.html#checklist-auth"><span class="std std-ref">enabling authentication</span></a> and
<a class="reference internal" href="../../core/security-hardening.html"><span class="doc">hardening network infrastructure</span></a>.</p>
</div>
<p>For more information about IP Binding, refer to the
<a class="reference internal" href="../../core/security-mongodb-configuration.html"><span class="doc">IP Binding</span></a> documentation.</p>
<p>Alternatively, you can set the <code class="docutils literal"><span class="pre">--bind_ip</span></code> option to <code class="docutils literal"><span class="pre">::,0.0.0.0</span></code>
or, starting in MongoDB 4.2, to an asterisk <code class="docutils literal"><span class="pre">&quot;*&quot;</span></code> (enclose the
asterisk in quotes to avoid filename pattern expansion).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">--bind_ip</span></code> and <code class="docutils literal"><span class="pre">--bind_ip_all</span></code> are mutually exclusive. That
is, you can specify one or the other, but not both.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-maxconns">
<code class="descname">--maxConns</code><code class="descclassname"> &lt;number&gt;</code><a class="headerlink" href="#cmdoption-mongos-maxconns" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of simultaneous connections that <strong class="program">mongos</strong> will
accept. This setting has no effect if it is higher than your operating
system’s configured maximum connection tracking threshold.</p>
<p>Do not assign too low of a value to this option, or you will
encounter errors during normal application operation.</p>
<p>This is particularly useful for a <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> if you have a client
that creates multiple connections and allows them to timeout rather
than closing them.</p>
<p>In this case, set <a class="reference internal" href="../configuration-options.html#net.maxIncomingConnections" title="net.maxIncomingConnections"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">maxIncomingConnections</span></code></a> to a value slightly
higher than the maximum number of connections that the client creates, or the
maximum size of the connection pool.</p>
<p>This setting prevents the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> from causing connection spikes on
the individual <a class="reference internal" href="../glossary.html#term-shard"><span class="xref std std-term">shards</span></a>. Spikes like these may disrupt the
operation and memory allocation of the <a class="reference internal" href="../glossary.html#term-sharded-cluster"><span class="xref std std-term">sharded cluster</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-syslog">
<code class="descname">--syslog</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-syslog" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends all logging output to the host’s <a class="reference internal" href="../glossary.html#term-syslog"><span class="xref std std-term">syslog</span></a> system rather
than to standard output or to a log file (<a class="reference internal" href="#cmdoption-mongos-logpath"><code class="xref std std-option docutils literal"><span class="pre">--logpath</span></code></a>).</p>
<p>The <a class="reference internal" href="#cmdoption-mongos-syslog"><code class="xref std std-option docutils literal"><span class="pre">--syslog</span></code></a> option is not supported on Windows.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The <code class="docutils literal"><span class="pre">syslog</span></code> daemon generates timestamps when it logs a message, not
when MongoDB issues the message. This can lead to misleading timestamps
for log entries, especially when the system is under heavy load. We
recommend using the <a class="reference internal" href="#cmdoption-mongos-logpath"><code class="xref std std-option docutils literal"><span class="pre">--logpath</span></code></a> option for production systems to
ensure accurate timestamps.</p>
</div>
<p>Starting in version 4.2, MongoDB includes the <a class="reference internal" href="../log-messages.html#log-message-components"><span class="std std-ref">component</span></a> in its log messages to <code class="docutils literal"><span class="pre">syslog</span></code>.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-none"><div class="highlight"><pre><span></span>...  ACCESS   [repl writer worker 5] Unsupported modification to roles collection ...
</pre></div>
</div>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-syslogfacility">
<code class="descname">--syslogFacility</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-syslogfacility" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: user</p>
<p>Specifies the facility level used when logging messages to syslog.
The value you specify must be supported by your
operating system’s implementation of syslog. To use this option, you
must  enable the <a class="reference internal" href="#cmdoption-mongos-syslog"><code class="xref std std-option docutils literal"><span class="pre">--syslog</span></code></a> option.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-logpath">
<code class="descname">--logpath</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongos-logpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends all diagnostic logging information to a log file instead of to
standard output or to the host’s <a class="reference internal" href="../glossary.html#term-syslog"><span class="xref std std-term">syslog</span></a> system. MongoDB creates
the log file at the path you specify.</p>
<p>By default, MongoDB will move any existing log file rather than overwrite
it. To instead append to the log file, set the <a class="reference internal" href="#cmdoption-mongos-logappend"><code class="xref std std-option docutils literal"><span class="pre">--logappend</span></code></a> option.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-logappend">
<code class="descname">--logappend</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-logappend" title="Permalink to this definition">¶</a></dt>
<dd><p>Appends new entries to the end of the existing log file when the <strong class="program">mongos</strong>
instance restarts. Without this option, <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> will back up the
existing log and create a new file.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-redactclientlogdata">
<code class="descname">--redactClientLogData</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-redactclientlogdata" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>A <strong class="program">mongos</strong> running with <a class="reference internal" href="#cmdoption-mongos-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> redacts any message accompanying a given
log event before logging. This prevents the <strong class="program">mongos</strong> from writing
potentially sensitive data stored on the database to the diagnostic log.
Metadata such as error or operation codes, line numbers, and source file
names are still visible in the logs.</p>
<p>Use <a class="reference internal" href="#cmdoption-mongos-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> in conjunction with
<a class="reference internal" href="../../core/security-encryption-at-rest.html"><span class="doc">Encryption at Rest</span></a> and
<a class="reference internal" href="../../core/security-transport-encryption.html"><span class="doc">TLS/SSL (Transport Encryption)</span></a> to assist compliance with
regulatory requirements.</p>
<p>For example, a MongoDB deployment might store Personally Identifiable
Information (PII) in one or more collections. The <strong class="program">mongos</strong> logs events
such as those related to CRUD operations, sharding metadata, etc. It is
possible that the <strong class="program">mongos</strong> may expose PII as a part of these logging
operations. A <strong class="program">mongos</strong> running with <a class="reference internal" href="#cmdoption-mongos-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> removes any message
accompanying these events before being output to the log, effectively
removing the PII.</p>
<p>Diagnostics on a <strong class="program">mongos</strong> running with <a class="reference internal" href="#cmdoption-mongos-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> may be more difficult
due to the lack of data related to a log event. See the
<a class="reference internal" href="../../administration/monitoring.html#monitoring-log-redaction"><span class="std std-ref">process logging</span></a> manual page for an
example of the effect of <a class="reference internal" href="#cmdoption-mongos-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> on log output.</p>
<p>On a running <strong class="program">mongos</strong>, use <a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a> with the
<a class="reference internal" href="../parameters.html#param.redactClientLogData" title="redactClientLogData"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">redactClientLogData</span></code></a> parameter to configure this setting.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-timestampformat">
<code class="descname">--timeStampFormat</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-timestampformat" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: iso8601-local</p>
<p>The time format for timestamps in log messages. Specify one of the
following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">ctime</span></code></td>
<td>Displays timestamps as <code class="docutils literal"><span class="pre">Wed</span> <span class="pre">Dec</span> <span class="pre">31</span>
<span class="pre">18:17:54.811</span></code>.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">iso8601-utc</span></code></td>
<td>Displays timestamps in Coordinated Universal Time (UTC) in the
ISO-8601 format. For example, for New York at the start of the
Epoch: <code class="docutils literal"><span class="pre">1970-01-01T00:00:00.000Z</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">iso8601-local</span></code></td>
<td>Displays timestamps in local time in the ISO-8601
format. For example, for New York at the start of the Epoch:
<code class="docutils literal"><span class="pre">1969-12-31T19:00:00.000-0500</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-pidfilepath">
<code class="descname">--pidfilepath</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongos-pidfilepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies a file location to store the process ID (PID) of the <strong class="program">mongos</strong>
process . The user running the the <code class="docutils literal"><span class="pre">mongod</span></code> or <code class="docutils literal"><span class="pre">mongos</span></code>
process must be able to write to this path. If the <a class="reference internal" href="#cmdoption-mongos-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option is not
specified, the process does not create a PID file. This option is generally
only useful in combination with the the <a class="reference internal" href="#cmdoption-mongos-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> option.</p>
<div class="note admonition">
<p class="first admonition-title">Linux</p>
<p class="last">On Linux, PID file management is generally the responsibility of
your distro’s init system: usually a service file in the <code class="docutils literal"><span class="pre">/etc/init.d</span></code>
directory, or a systemd unit file registered with <code class="docutils literal"><span class="pre">systemctl</span></code>. Only
use the <a class="reference internal" href="#cmdoption-mongos-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option if you are not using one of these init
systems. For more information, please see the respective
<a class="reference internal" href="../../installation.html"><span class="doc">Installation Guide</span></a> for your operating system.</p>
</div>
<div class="note admonition">
<p class="first admonition-title">macOS</p>
<p class="last">On macOS, PID file management is generally handled by <code class="docutils literal"><span class="pre">brew</span></code>. Only use
the <a class="reference internal" href="#cmdoption-mongos-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option if you are not using <code class="docutils literal"><span class="pre">brew</span></code> on your macOS system.
For more information, please see the respective
<a class="reference internal" href="../../installation.html"><span class="doc">Installation Guide</span></a> for your operating system.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-keyfile">
<code class="descname">--keyFile</code><code class="descclassname"> &lt;file&gt;</code><a class="headerlink" href="#cmdoption-mongos-keyfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the path to a key file that stores the shared secret
that MongoDB instances use to authenticate to each other in a
<a class="reference internal" href="../glossary.html#term-sharded-cluster"><span class="xref std std-term">sharded cluster</span></a> or <a class="reference internal" href="../glossary.html#term-replica-set"><span class="xref std std-term">replica set</span></a>. <a class="reference internal" href="#cmdoption-mongos-keyfile"><code class="xref std std-option docutils literal"><span class="pre">--keyFile</span></code></a> implies
<code class="docutils literal"><span class="pre">client</span> <span class="pre">authorization</span></code>. See <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">Internal/Membership Authentication</span></a> for more
information.</p>
<p>Starting in MongoDB 4.2, <a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-keyfile"><span class="std std-ref">keyfiles for internal membership
authentication</span></a> use YAML format to allow for
multiple keys in a keyfile. The YAML format accepts content of:</p>
<ul class="simple">
<li>a single key string (same as in earlier versions),</li>
<li>multiple key strings (each string must be enclosed in quotes), or</li>
<li>sequence of key strings.</li>
</ul>
<p>The YAML format is compatible with the existing single-key
keyfiles that use the text file format.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-setparameter">
<code class="descname">--setParameter</code><code class="descclassname"> &lt;options&gt;</code><a class="headerlink" href="#cmdoption-mongos-setparameter" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies one of the MongoDB parameters described in
<a class="reference internal" href="../parameters.html"><span class="doc">MongoDB Server Parameters</span></a>. You can specify multiple <code class="docutils literal"><span class="pre">setParameter</span></code>
fields.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-nounixsocket">
<code class="descname">--nounixsocket</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-nounixsocket" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables listening on the UNIX domain socket. <a class="reference internal" href="#cmdoption-mongos-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> applies only
to Unix-based systems.</p>
<p>The <strong class="program">mongos</strong> process
always listens on the UNIX socket unless one of the following is true:</p>
<ul class="simple">
<li><a class="reference internal" href="#cmdoption-mongos-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> is set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> is not set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> does not specify <code class="docutils literal"><span class="pre">localhost</span></code> or its associated IP address</li>
</ul>
<p><strong class="program">mongos</strong> installed from official <a class="reference internal" href="../../tutorial/install-mongodb-on-debian.html"><span class="doc">.deb</span></a> and <a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat.html"><span class="doc">.rpm</span></a> packages
have the <code class="xref mongodb mongodb-setting docutils literal"><span class="pre">bind_ip</span></code> configuration set to <code class="docutils literal"><span class="pre">127.0.0.1</span></code> by
default.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-unixsocketprefix">
<code class="descname">--unixSocketPrefix</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongos-unixsocketprefix" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: /tmp</p>
<p>The path for the UNIX socket. <a class="reference internal" href="#cmdoption-mongos-unixsocketprefix"><code class="xref std std-option docutils literal"><span class="pre">--unixSocketPrefix</span></code></a> applies only
to Unix-based systems.</p>
<p>If this option has no value, the
<strong class="program">mongos</strong> process creates a socket with <code class="docutils literal"><span class="pre">/tmp</span></code> as a prefix. MongoDB
creates and listens on a UNIX socket unless one of the following is true:</p>
<ul class="simple">
<li><a class="reference internal" href="../configuration-options.html#net.unixDomainSocket.enabled" title="net.unixDomainSocket.enabled"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.unixDomainSocket.enabled</span></code></a> is <code class="docutils literal"><span class="pre">false</span></code></li>
<li><a class="reference internal" href="#cmdoption-mongos-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> is set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> is not set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> does not specify <code class="docutils literal"><span class="pre">localhost</span></code> or its associated IP address</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-filepermissions">
<code class="descname">--filePermissions</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongos-filepermissions" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: <code class="docutils literal"><span class="pre">0700</span></code></p>
<p>Sets the permission for the UNIX domain socket file.</p>
<p><a class="reference internal" href="#cmdoption-mongos-filepermissions"><code class="xref std std-option docutils literal"><span class="pre">--filePermissions</span></code></a> applies only to Unix-based systems.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-fork">
<code class="descname">--fork</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-fork" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables a <a class="reference internal" href="../glossary.html#term-daemon"><span class="xref std std-term">daemon</span></a> mode that runs the <strong class="program">mongos</strong> process in the
background. By default <strong class="program">mongos</strong> does not run as a daemon:
typically you will run <strong class="program">mongos</strong> as a daemon, either by using
<a class="reference internal" href="#cmdoption-mongos-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> or by using a controlling process that handles the
daemonization process (e.g. as with <code class="docutils literal"><span class="pre">upstart</span></code> and <code class="docutils literal"><span class="pre">systemd</span></code>).</p>
<p>The <a class="reference internal" href="#cmdoption-mongos-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> option is not supported on Windows.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-transitiontoauth">
<code class="descname">--transitionToAuth</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-transitiontoauth" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Allows the <strong class="program">mongos</strong> to accept and create authenticated and
non-authenticated connections to and from other <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
and <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances in the deployment. Used for
performing rolling transition of replica sets or sharded clusters
from a no-auth configuration to <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a>. Requires specifying a <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal
authentication</span></a> mechanism such as
<a class="reference internal" href="#cmdoption-mongos-keyfile"><code class="xref std std-option docutils literal"><span class="pre">--keyFile</span></code></a>.</p>
</div>
<p>For example, if using <a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-keyfile"><span class="std std-ref">keyfiles</span></a> for
<a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a>, the <strong class="program">mongos</strong> creates
an authenticated connection with any <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> or <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>
in the deployment using a matching keyfile. If the security mechanisms do
not match, the <strong class="program">mongos</strong> utilizes a non-authenticated connection instead.</p>
<p>A <strong class="program">mongos</strong> running with <a class="reference internal" href="#cmdoption-mongos-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a> does not enforce <a class="reference internal" href="../../core/authorization.html#authorization"><span class="std std-ref">user access
controls</span></a>. Users may connect to your deployment without any
access control checks and perform read, write, and administrative operations.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A <strong class="program">mongos</strong> running with <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a> and <em>without</em> <a class="reference internal" href="#cmdoption-mongos-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a> requires clients to connect
using <a class="reference internal" href="../../core/authorization.html#authorization"><span class="std std-ref">user access controls</span></a>. Update clients to
connect to the <strong class="program">mongos</strong> using the appropriate <a class="reference internal" href="../../core/security-users.html#users"><span class="std std-ref">user</span></a>
prior to restarting <strong class="program">mongos</strong> without <a class="reference internal" href="#cmdoption-mongos-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-networkmessagecompressors">
<code class="descname">--networkMessageCompressors</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-networkmessagecompressors" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: snappy,zstd,zlib</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4.</span></p>
</div>
<p>Specifies the default compressor(s) to use for
communication between this <strong class="program">mongos</strong> instance and:</p>
<ul class="simple">
<li>other members of the sharded cluster</li>
<li>a <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell</li>
<li>drivers that support the <code class="docutils literal"><span class="pre">OP_COMPRESSED</span></code> message format.</li>
</ul>
<p>MongoDB supports the following compressors:</p>
<ul class="simple">
<li><a class="reference internal" href="../glossary.html#term-snappy"><span class="xref std std-term">snappy</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zlib"><span class="xref std std-term">zlib</span></a> (Available starting in MongoDB 3.6)</li>
<li><a class="reference internal" href="../glossary.html#term-zstd"><span class="xref std std-term">zstd</span></a> (Available  starting in MongoDB 4.2)</li>
</ul>
<p><strong>In versions 3.6 and 4.0</strong>, <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and
<a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> enable network compression by default with
<code class="docutils literal"><span class="pre">snappy</span></code> as the compressor.</p>
<p><strong>Starting in version 4.2</strong>, <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and
<a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances default to both <code class="docutils literal"><span class="pre">snappy,zstd,zlib</span></code>
compressors, in that order.</p>
<p>To disable network compression, set the value to <code class="docutils literal"><span class="pre">disabled</span></code>.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">Messages are compressed when both parties enable network
compression. Otherwise, messages between the parties are
uncompressed.</p>
</div>
<p>If you specify multiple compressors, then the order in which you list
the compressors matter as well as the communication initiator. For
example, if a <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell specifies the following network
compressors <code class="docutils literal"><span class="pre">zlib,snappy</span></code> and the <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> specifies
<code class="docutils literal"><span class="pre">snappy,zlib</span></code>, messages between <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell and
<a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> uses <code class="docutils literal"><span class="pre">zlib</span></code>.</p>
<p>If the parties do not share at least one common compressor, messages
between the parties are uncompressed. For example, if a
<a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell specifies the network compressor
<code class="docutils literal"><span class="pre">zlib</span></code> and <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> specifies <code class="docutils literal"><span class="pre">snappy</span></code>, messages
between <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell and <a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> are not compressed.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-serviceexecutor">
<code class="descname">--serviceExecutor</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-serviceexecutor" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: synchronous</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>Determines the threading and execution model <strong class="program">mongos</strong> uses to
execute client requests. The <code class="docutils literal"><span class="pre">--serviceExecutor</span></code> option accepts one
of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">synchronous</span></code></td>
<td>The <strong class="program">mongos</strong> uses synchronous networking and manages its
networking thread pool on a per connection basis. Previous
versions of MongoDB managed threads in this way.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">adaptive</span></code></td>
<td>The <strong class="program">mongos</strong> uses the new experimental asynchronous
networking mode with an adaptive thread pool which manages
threads on a per request basis. This mode should have more
consistent performance and use less resources when there are
more inactive connections than database requests.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-timezoneinfo">
<code class="descname">--timeZoneInfo</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongos-timezoneinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>The full path from which to load the time zone database. If this option
is not provided, then MongoDB will use its built-in time zone database.</p>
<p>The configuration file included with Linux and macOS packages sets the time
zone database path to <code class="docutils literal"><span class="pre">/usr/share/zoneinfo</span></code> by default.</p>
<p>The built-in time zone database is a copy of the <a class="reference external" href="https://www.iana.org/time-zones">Olson/IANA time zone
database</a>. It is updated along with MongoDB
releases, but the release cycle of the time zone database differs from the
release cycle of MongoDB. A copy of the most recent release of the time zone
database can be downloaded from
<a class="reference external" href="https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip">https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip</a>.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-sh"><div class="highlight"><pre><span></span>wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip
unzip timezonedb-latest.zip
mongos --timeZoneInfo timezonedb-2017b/
</pre></div>
</div>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-outputconfig">
<code class="descname">--outputConfig</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-outputconfig" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Outputs the <strong class="program">mongos</strong> instance’s configuration options, formatted
in YAML, to <code class="docutils literal"><span class="pre">stdout</span></code> and exits the <strong class="program">mongos</strong> instance. For
configuration options that uses <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Externally Sourced Configuration File Values</span></a>,
<a class="reference internal" href="#cmdoption-mongos-outputconfig"><code class="xref std std-option docutils literal"><span class="pre">--outputConfig</span></code></a> returns the resolved value for those options.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This may include any configured passwords or secrets previously
obfuscated through the external source.</p>
</div>
<p>For usage examples, see:</p>
<ul class="simple">
<li><a class="reference internal" href="../expansion-directives.html#expansion-directive-output"><span class="std std-ref">Output the Configuration File with Resolved Expansion Directive Values</span></a></li>
<li><a class="reference internal" href="../../tutorial/convert-command-line-options-to-yaml.html"><span class="doc">Convert Command-Line Options to YAML</span></a></li>
</ul>
</dd></dl>

</div>
<div class="section" id="sharded-cluster-options">
<h3>Sharded Cluster Options<a class="headerlink" href="#sharded-cluster-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongos-configdb">
<code class="descname">--configdb</code><code class="descclassname"> &lt;replicasetName&gt;/&lt;config1&gt;,&lt;config2&gt;...</code><a class="headerlink" href="#cmdoption-mongos-configdb" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionchanged">
<p><span class="versionmodified">Changed in version 3.2.</span></p>
</div>
<p>Specifies the <a class="reference internal" href="../../core/sharded-cluster-config-servers.html#sharding-config-server"><span class="std std-ref">configuration servers</span></a> for the
<a class="reference internal" href="../glossary.html#term-sharded-cluster"><span class="xref std std-term">sharded cluster</span></a>.</p>
<p>Starting in MongoDB 3.2, config servers for sharded clusters can be
deployed as a <a class="reference internal" href="../../replication.html"><span class="doc">replica set</span></a>. The
replica set config servers must run the <a class="reference internal" href="../../core/wiredtiger.html"><span class="doc">WiredTiger storage engine</span></a>. MongoDB 3.2 deprecates the use of three mirrored
<a class="reference internal" href="mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances for config servers.</p>
<p>Specify the config server replica set name and the hostname and port of
at least one of the members of the config server replica set.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span>sharding:
  configDB: &lt;configReplSetName&gt;/cfg1.example.net:27019, cfg2.example.net:27019,...
</pre></div>
</div>
</div>
<p>The <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances for the sharded cluster must specify
the same config server replica set name but can specify hostname and
port of different members of the replica set.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-localthreshold">
<code class="descname">--localThreshold</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-localthreshold" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 15</p>
<p>Specifies the ping time, in milliseconds, that <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> uses
to determine which secondary replica set members to pass read
operations from clients. The default value of <code class="docutils literal"><span class="pre">15</span></code> corresponds to
the default value in all of the client <a class="reference external" href="https://docs.mongodb.com/ecosystem/drivers">drivers</a>.</p>
<p>When <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> receives a request that permits reads to
<a class="reference internal" href="../glossary.html#term-secondary"><span class="xref std std-term">secondary</span></a> members, the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> will:</p>
<ul>
<li><p class="first">Find the member of the set with the lowest ping time.</p>
</li>
<li><p class="first">Construct a list of replica set members that is within a ping time of
15 milliseconds of the nearest suitable member of the set.</p>
<p>If you specify a value for the <a class="reference internal" href="#cmdoption-mongos-localthreshold"><code class="xref std std-option docutils literal"><span class="pre">--localThreshold</span></code></a> option, <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> will
construct the list of replica members that are within the latency
allowed by this value.</p>
</li>
<li><p class="first">Select a member to read from at random from this list.</p>
</li>
</ul>
<p>The ping time used for a member compared by the <a class="reference internal" href="#cmdoption-mongos-localthreshold"><code class="xref std std-option docutils literal"><span class="pre">--localThreshold</span></code></a> setting is a
moving average of recent ping times, calculated at most every 10
seconds. As a result, some queries may reach members above the threshold
until the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> recalculates the average.</p>
<p>See the <a class="reference internal" href="../../core/read-preference-mechanics.html#replica-set-read-preference-behavior-member-selection"><span class="std std-ref">Read Preference for Replica Sets</span></a>
section of the <a class="reference internal" href="../../core/read-preference.html"><span class="doc">read preference</span></a>
documentation for more information.</p>
</dd></dl>

</div>
<div class="section" id="tls-options">
<span id="mongos-tls-options"></span><h3>TLS Options<a class="headerlink" href="#tls-options" title="Permalink to this headline">¶</a></h3>
<div class="admonition-see admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> for full
documentation of MongoDB’s support.</p>
</div>
<dl class="option">
<dt id="cmdoption-mongos-tlsmode">
<code class="descname">--tlsMode</code><code class="descclassname"> &lt;mode&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Enables TLS used for all network connections. The
argument to the <a class="reference internal" href="#cmdoption-mongos-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span></code></a> option can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">disabled</span></code></td>
<td>The server does not use TLS.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">allowTLS</span></code></td>
<td>Connections between servers do not use TLS. For incoming
connections, the server accepts both TLS and non-TLS.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">preferTLS</span></code></td>
<td>Connections between servers use TLS. For incoming
connections, the server accepts both TLS and non-TLS.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">requireTLS</span></code></td>
<td>The server uses and accepts only TLS encrypted connections.</td>
</tr>
</tbody>
</table>
<p>If <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code> is not
specified and you are not using x.509 authentication, the
system-wide CA certificate store will be used when connecting to an
TLS-enabled server.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="mongod.html#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlscertificatekeyfile">
<code class="descname">--tlsCertificateKeyFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlscertificatekeyfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of specifying a PEM file. See
<a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains both the TLS certificate
and key.</p>
<ul class="simple">
<li>On Linux/BSD, you must specify <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> when TLS is enabled.</li>
<li>On Windows or macOS, you must specify either <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> or
<a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> when TLS is enabled.</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlscertificatekeyfilepassword">
<code class="descname">--tlsCertificateKeyFilePassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlscertificatekeyfilepassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the password to de-crypt the certificate-key file (i.e.
<a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>). Use the <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option only if the
certificate-key file is encrypted. In all cases, the <strong class="program">mongos</strong> will
redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the PEM file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS or Windows, if the private key in the PEM file is
encrypted, you must explicitly specify the <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option.
Alternatively, you can use a certificate from the secure system
store (see <a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>) instead of a PEM file or use an
unencrypted PEM file.</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-clusterauthmode">
<code class="descname">--clusterAuthMode</code><code class="descclassname"> &lt;option&gt;</code><a class="headerlink" href="#cmdoption-mongos-clusterauthmode" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: keyFile</p>
<p>The authentication mode used for cluster authentication. If you use
<a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">internal x.509 authentication</span></a>,
specify so here. This option can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">keyFile</span></code></td>
<td>Use a keyfile for authentication.
Accept only keyfiles.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">sendKeyFile</span></code></td>
<td>For rolling upgrade purposes. Send a keyfile for
authentication but can accept both keyfiles and x.509
certificates.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">sendX509</span></code></td>
<td>For rolling upgrade purposes. Send the x.509 certificate for
authentication but can accept both keyfiles and x.509
certificates.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">x509</span></code></td>
<td>Recommended. Send the x.509 certificate for authentication and
accept only x.509 certificates.</td>
</tr>
</tbody>
</table>
<p>If <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code> is not
specified and you are not using x.509 authentication, the
system-wide CA certificate store will be used when connecting to an
TLS-enabled server.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="mongod.html#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsclusterfile">
<code class="descname">--tlsClusterFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsclusterfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate
from the operating system’s secure store instead of a PEM
file. See <a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the x.509 certificate-key
file for <a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">membership authentication</span></a>
for the cluster or replica set.</p>
<p>If <a class="reference internal" href="#cmdoption-mongos-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> does not specify the <code class="docutils literal"><span class="pre">.pem</span></code> file for internal cluster
authentication or the alternative
<a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>, the cluster uses the
<code class="docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> option or
the certificate returned by the <a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="mongod.html#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsclusterpassword">
<code class="descname">--tlsClusterPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsclusterpassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the password to de-crypt the x.509 certificate-key file
specified with <code class="docutils literal"><span class="pre">--tlsClusterFile</span></code>. Use the <a class="reference internal" href="#cmdoption-mongos-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option only
if the certificate-key file is encrypted. In all cases, the <strong class="program">mongos</strong>
will redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the x.509 file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongos-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS or Windows, if the private key in the x.509 file is
encrypted, you must explicitly specify the <a class="reference internal" href="#cmdoption-mongos-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option.
Alternatively, you can either use a certificate from the secure
system store (see <a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>) instead of a cluster PEM file or
use an unencrypted PEM file.</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlscafile">
<code class="descname">--tlsCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlscafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
<code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<p>Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of a PEM key file. See
<a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>. When using the secure store, you
do not need to, but can, also specify the <a class="reference internal" href="#cmdoption-mongos-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsclustercafile">
<code class="descname">--tlsClusterCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsclustercafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate chain
from the Certificate Authority used to validate the certificate
presented by a client establishing a connection. Specify the file
name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<p>If <a class="reference internal" href="#cmdoption-mongos-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> does not specify the <code class="file docutils literal"><span class="pre">.pem</span></code> file for validating the
certificate from a client establishing a connection, the cluster uses
the <code class="file docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongos-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> option.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> lets you use separate Certificate Authorities to verify the
client to server and server to client portions of the TLS handshake.</p>
<p>Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of a PEM key file. See
<a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>. When using the secure store, you
do not need to, but can, also specify the <a class="reference internal" href="#cmdoption-mongos-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a>.</p>
<p>Requires that <a class="reference internal" href="#cmdoption-mongos-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> is set.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlscertificateselector">
<code class="descname">--tlsCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlscertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Available on Windows and macOS as an alternative to <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>.</p>
<p>The <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> options are mutually exclusive. You can only
specify one.</p>
</div>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> accepts an argument of the format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code>
where the property can be one of the following:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>When using the system SSL certificate store, OCSP (Online
Certificate Status Protocol) is used to validate the revocation
status of certificates.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsclustercertificateselector">
<code class="descname">--tlsClusterCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsclustercertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongos-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> options are mutually exclusive. You can only
specify one.</p>
</div>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store to use for
internal authentication.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> accepts an argument of the format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code>
where the property can be one of the following:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlscrlfile">
<code class="descname">--tlsCRLFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlscrlfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the Certificate Revocation
List. Specify the file name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or
absolute paths.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="#cmdoption-mongos-tlscrlfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCRLFile</span></code></a> on macOS.  Use <a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> instead.</p>
</div>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsallowconnectionswithoutcertificates">
<code class="descname">--tlsAllowConnectionsWithoutCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-tlsallowconnectionswithoutcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>For clients that do not present certificates, <strong class="program">mongos</strong> bypasses
TLS/SSL certificate validation when establishing the connection.</p>
<p>For clients that present a certificate, however, <strong class="program">mongos</strong> performs
certificate validation using the root certificate chain specified by
<code class="docutils literal"><span class="pre">--tlsCAFile</span></code> and reject clients with invalid certificates.</p>
<p>Use the <a class="reference internal" href="#cmdoption-mongos-tlsallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowConnectionsWithoutCertificates</span></code></a> option if you have a mixed deployment that includes
clients that do not or cannot present certificates to the <strong class="program">mongos</strong>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsallowinvalidcertificates">
<code class="descname">--tlsAllowInvalidCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-tlsallowinvalidcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Bypasses the validation checks for TLS certificates on other
servers in the cluster and allows the use of invalid certificates to
connect.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you specify
<code class="docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code> or <code class="docutils literal"><span class="pre">tls.allowInvalidCertificates:</span>
<span class="pre">true</span></code> when using x.509 authentication, an invalid certificate is
only sufficient to establish a TLS connection but is
<em>insufficient</em> for authentication.</p>
</div>
<p>When using
the <a class="reference internal" href="#cmdoption-mongos-tlsallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code></a> setting, MongoDB
logs a warning regarding the use of the invalid certificate.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsallowinvalidhostnames">
<code class="descname">--tlsAllowInvalidHostnames</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-tlsallowinvalidhostnames" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Disables the validation of the hostnames in TLS certificates,
when connecting to other members of the replica set or sharded cluster
for inter-process authentication. This allows <strong class="program">mongos</strong> to connect
to other members if the hostnames in their certificates do not match
their configured hostname.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsdisabledprotocols">
<code class="descname">--tlsDisabledProtocols</code><code class="descclassname"> &lt;protocol(s)&gt;</code><a class="headerlink" href="#cmdoption-mongos-tlsdisabledprotocols" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Prevents a MongoDB server running with TLS from accepting
incoming connections that use a specific protocol or protocols. To
specify multiple protocols, use a comma separated list of protocols.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a> recognizes the following protocols: <code class="docutils literal"><span class="pre">TLS1_0</span></code>, <code class="docutils literal"><span class="pre">TLS1_1</span></code>,
<code class="docutils literal"><span class="pre">TLS1_2</span></code>, and starting in version 4.0.4 (and 3.6.9), <code class="docutils literal"><span class="pre">TLS1_3</span></code>.</p>
<ul class="simple">
<li>On macOS, you cannot disable <code class="docutils literal"><span class="pre">TLS1_1</span></code> and leave both <code class="docutils literal"><span class="pre">TLS1_0</span></code> and
<code class="docutils literal"><span class="pre">TLS1_2</span></code> enabled. You must disable at least one of the other
two, for example, <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>To list multiple protocols, specify as a comma separated list of
protocols. For example <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>Specifying an unrecognized protocol will prevent the server from
starting.</li>
<li>The specified disabled protocols overrides any default disabled
protocols.</li>
</ul>
<p>Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
1.1+ is available on the system. To enable the disabled TLS 1.0,
specify <code class="docutils literal"><span class="pre">none</span></code> to <a class="reference internal" href="#cmdoption-mongos-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a>. See <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</p>
<p>Members of replica sets and sharded clusters must speak at least one
protocol in common.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-disallow-protocols"><span class="std std-ref">Disallow Protocols</span></a></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-tlsfipsmode">
<code class="descname">--tlsFIPSMode</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-tlsfipsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Directs the <strong class="program">mongos</strong> to use the FIPS mode of the  TLS
library. Your system must have a FIPS
compliant library to use the <a class="reference internal" href="#cmdoption-mongos-tlsfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsFIPSMode</span></code></a> option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">FIPS-compatible TLS/SSL is
available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>. See
<a class="reference internal" href="../../tutorial/configure-fips.html"><span class="doc">Configure MongoDB for FIPS</span></a> for more information.</p>
</div>
</dd></dl>

</div>
<div class="section" id="ssl-options-deprecated">
<span id="mongos-ssl-options"></span><h3>SSL Options (Deprecated)<a class="headerlink" href="#ssl-options-deprecated" title="Permalink to this headline">¶</a></h3>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">All SSL options are deprecated since 4.2. Use the TLS counterparts
instead, as they have identical functionality to the SSL options.  The SSL
protocol is deprecated and MongoDB supports TLS 1.0 and later.</p>
</div>
<div class="admonition-see admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> for full
documentation of MongoDB’s support.</p>
</div>
<dl class="option">
<dt id="cmdoption-mongos-sslonnormalports">
<code class="descname">--sslOnNormalPorts</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-sslonnormalports" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 2.6: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span> <span class="pre">requireTLS</span></code></a> instead.</p>
</div>
<p>Enables TLS/SSL for <strong class="program">mongos</strong>.</p>
<p>With <a class="reference internal" href="#cmdoption-mongos-sslonnormalports"><code class="xref std std-option docutils literal"><span class="pre">--sslOnNormalPorts</span></code></a>, a <strong class="program">mongos</strong> requires TLS/SSL encryption for all
connections on the default MongoDB port, or the port specified by
<a class="reference internal" href="#cmdoption-mongos-port"><code class="xref std std-option docutils literal"><span class="pre">--port</span></code></a>. By default, <a class="reference internal" href="#cmdoption-mongos-sslonnormalports"><code class="xref std std-option docutils literal"><span class="pre">--sslOnNormalPorts</span></code></a> is
disabled.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslmode">
<code class="descname">--sslMode</code><code class="descclassname"> &lt;mode&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span></code></a> instead.</p>
</div>
<p>Enables TLS/SSL or mixed TLS/SSL used for all network connections. The
argument to the <a class="reference internal" href="#cmdoption-mongos-sslmode"><code class="xref std std-option docutils literal"><span class="pre">--sslMode</span></code></a> option can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">disabled</span></code></td>
<td>The server does not use TLS/SSL.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">allowSSL</span></code></td>
<td>Connections between servers do not use TLS/SSL. For incoming
connections, the server accepts both TLS/SSL and non-TLS/non-SSL.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">preferSSL</span></code></td>
<td>Connections between servers use TLS/SSL. For incoming
connections, the server accepts both TLS/SSL and non-TLS/non-SSL.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">requireSSL</span></code></td>
<td>The server uses and accepts only TLS/SSL encrypted connections.</td>
</tr>
</tbody>
</table>
<p>Starting in version 3.4, if <code class="docutils literal"><span class="pre">--tlsCAFile</span></code>/<code class="docutils literal"><span class="pre">net.tls.CAFile</span></code> (or
their aliases <code class="docutils literal"><span class="pre">--sslCAFile</span></code>/<code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code>) is not specified
and you are not using x.509 authentication, the system-wide CA
certificate store will be used when connecting to an TLS/SSL-enabled
server.</p>
<p>To use x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">net.tls.CAFile</span></code>
must be specified unless using <code class="docutils literal"><span class="pre">--tlsCertificateSelector</span></code> or
<code class="docutils literal"><span class="pre">--net.tls.certificateSelector</span></code>. Or if using the <code class="docutils literal"><span class="pre">ssl</span></code> aliases,
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> or <code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code> must be specified unless using
<code class="docutils literal"><span class="pre">--sslCertificateSelector</span></code> or <code class="docutils literal"><span class="pre">net.ssl.certificateSelector</span></code>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslpemkeyfile">
<code class="descname">--sslPEMKeyFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslpemkeyfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsPEMKeyFile</span></code></a> instead.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of a PEM file. See
<a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains both the TLS/SSL certificate
and key.</p>
<ul class="simple">
<li>On Linux/BSD, you must specify <a class="reference internal" href="#cmdoption-mongos-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> when TLS/SSL is enabled.</li>
<li>On Windows or macOS, you must specify either <a class="reference internal" href="#cmdoption-mongos-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> or
<a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> when TLS/SSL is enabled.</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslpemkeypassword">
<code class="descname">--sslPEMKeyPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslpemkeypassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsPEMKeyPassword</span></code></a> instead.</p>
</div>
<p>Specifies the password to de-crypt the certificate-key file (i.e.
<a class="reference internal" href="#cmdoption-mongos-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a>). Use the <a class="reference internal" href="#cmdoption-mongos-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option only if the
certificate-key file is encrypted. In all cases, the <strong class="program">mongos</strong> will
redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the PEM file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongos-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS or Windows, if the private key in the PEM file is
encrypted, you must explicitly specify the <a class="reference internal" href="#cmdoption-mongos-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option.
Alternatively, you can use a certificate from the secure system
store (see <a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>) instead of a PEM key file or use an
unencrypted PEM file.</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslclusterfile">
<code class="descname">--sslClusterFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslclusterfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> instead.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate
from the operating system’s secure store instead of a PEM key
file. See <a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the x.509 certificate-key
file for <a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">membership authentication</span></a>
for the cluster or replica set.</p>
<p>If <a class="reference internal" href="#cmdoption-mongos-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a> does not specify the <code class="docutils literal"><span class="pre">.pem</span></code> file for internal cluster
authentication or the alternative
<a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>, the cluster uses the
<code class="docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongos-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> option or
the certificate returned by the <a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>.</p>
<p>To use x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">net.tls.CAFile</span></code>
must be specified unless using <code class="docutils literal"><span class="pre">--tlsCertificateSelector</span></code> or
<code class="docutils literal"><span class="pre">--net.tls.certificateSelector</span></code>. Or if using the <code class="docutils literal"><span class="pre">ssl</span></code> aliases,
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> or <code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code> must be specified unless using
<code class="docutils literal"><span class="pre">--sslCertificateSelector</span></code> or <code class="docutils literal"><span class="pre">net.ssl.certificateSelector</span></code>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslclusterpassword">
<code class="descname">--sslClusterPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslclusterpassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> instead.</p>
</div>
<p>Specifies the password to de-crypt the x.509 certificate-key file
specified with <code class="docutils literal"><span class="pre">--sslClusterFile</span></code>. Use the <a class="reference internal" href="#cmdoption-mongos-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option only
if the certificate-key file is encrypted. In all cases, the <strong class="program">mongos</strong>
will redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the x.509 file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongos-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS or Windows, if the private key in the x.509 file is
encrypted, you must explicitly specify the <a class="reference internal" href="#cmdoption-mongos-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option.
Alternatively, you can either use a certificate from the secure
system store (see <a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>) instead of a cluster PEM file or
use an unencrypted PEM file.</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslcafile">
<code class="descname">--sslCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslcafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
<code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<p>Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of a PEM key file. See
<a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>. When using the secure store, you
do not need to, but can, also specify the <a class="reference internal" href="#cmdoption-mongos-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslclustercafile">
<code class="descname">--sslClusterCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslclustercafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate chain
from the Certificate Authority used to validate the certificate
presented by a client establishing a connection. Specify the file
name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<p>If <a class="reference internal" href="#cmdoption-mongos-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> does not specify the <code class="file docutils literal"><span class="pre">.pem</span></code> file for validating the
certificate from a client establishing a connection, the cluster uses
the <code class="file docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongos-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> option.</p>
<p><a class="reference internal" href="#cmdoption-mongos-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> lets you use separate Certificate Authorities to verify the
client to server and server to client portions of the TLS handshake.</p>
<p>Starting in 4.0, on macOS or Windows, you can use a certificate from
the operating system’s secure store instead of a PEM key file. See
<a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>. When using the secure store, you
do not need to, but can, also specify the <a class="reference internal" href="#cmdoption-mongos-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a>.</p>
<p>Requires that <a class="reference internal" href="#cmdoption-mongos-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> is set.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslcertificateselector">
<code class="descname">--sslCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslcertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> instead.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available on Windows and macOS as an alternative to <a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongos-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> options are mutually exclusive. You can only
specify one.</p>
</div>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store.</p>
<p><a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> accepts an argument of the format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code>
where the property can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>When using the system SSL certificate store, OCSP (Online
Certificate Status Protocol) is used to validate the revocation
status of certificates.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslclustercertificateselector">
<code class="descname">--sslClusterCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslclustercertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> instead.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongos-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongos-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> options are mutually exclusive. You can only
specify one.</p>
</div>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store to use for
internal authentication.</p>
<p><a class="reference internal" href="#cmdoption-mongos-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> accepts an argument of the format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code>
where the property can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslcrlfile">
<code class="descname">--sslCRLFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongos-sslcrlfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlscrlfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCRLFile</span></code></a> instead.</p>
</div>
<p>Specifies the the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the Certificate Revocation
List. Specify the file name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or
absolute paths.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="#cmdoption-mongos-sslcrlfile"><code class="xref std std-option docutils literal"><span class="pre">--sslCRLFile</span></code></a> on macOS.  Use <a class="reference internal" href="#cmdoption-mongos-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> instead.</p>
</div>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslallowconnectionswithoutcertificates">
<code class="descname">--sslAllowConnectionsWithoutCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-sslallowconnectionswithoutcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowConnectionsWithoutCertificates</span></code></a> instead.</p>
</div>
<p>For clients that do not present certificates, <strong class="program">mongos</strong> bypasses
TLS/SSL certificate validation when establishing the connection.</p>
<p>For clients that present a certificate, however, <strong class="program">mongos</strong> performs
certificate validation using the root certificate chain specified by
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> and reject clients with invalid certificates.</p>
<p>Use the <a class="reference internal" href="#cmdoption-mongos-sslallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--sslAllowConnectionsWithoutCertificates</span></code></a> option if you have a mixed deployment that includes
clients that do not or cannot present certificates to the <strong class="program">mongos</strong>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslallowinvalidcertificates">
<code class="descname">--sslAllowInvalidCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-sslallowinvalidcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code></a> instead.</p>
</div>
<p>Bypasses the validation checks for TLS/SSL certificates on other
servers in the cluster and allows the use of invalid certificates to
connect.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, if you specify
<code class="docutils literal"><span class="pre">--sslAllowInvalidCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.ssl.allowInvalidCertificates:</span> <span class="pre">true</span></code> (or in MongoDB 4.2, the
alias <code class="docutils literal"><span class="pre">--tlsAllowInvalidateCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.tls.allowInvalidCertificates:</span> <span class="pre">true</span></code>) when using x.509
authentication, an invalid certificate is only sufficient to
establish a TLS/SSL connection but is <em>insufficient</em> for
authentication.</p>
</div>
<p>When using
the <a class="reference internal" href="#cmdoption-mongos-sslallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--sslAllowInvalidCertificates</span></code></a> setting, MongoDB
logs a warning regarding the use of the invalid certificate.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslallowinvalidhostnames">
<code class="descname">--sslAllowInvalidHostnames</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-sslallowinvalidhostnames" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsallowinvalidhostnames"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidHostnames</span></code></a> instead.</p>
</div>
<p>Disables the validation of the hostnames in TLS/SSL certificates,
when connecting to other members of the replica set or sharded cluster
for inter-process authentication. This allows <strong class="program">mongos</strong> to connect
to other members if the hostnames in their certificates do not match
their configured hostname.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ssldisabledprotocols">
<code class="descname">--sslDisabledProtocols</code><code class="descclassname"> &lt;protocol(s)&gt;</code><a class="headerlink" href="#cmdoption-mongos-ssldisabledprotocols" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a> instead.</p>
</div>
<p>Prevents a MongoDB server running with TLS/SSL from accepting
incoming connections that use a specific protocol or protocols. To
specify multiple protocols, use a comma separated list of protocols.</p>
<p><a class="reference internal" href="#cmdoption-mongos-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span></code></a> recognizes the following protocols: <code class="docutils literal"><span class="pre">TLS1_0</span></code>, <code class="docutils literal"><span class="pre">TLS1_1</span></code>,
<code class="docutils literal"><span class="pre">TLS1_2</span></code>, and starting in version 4.0.4 (and 3.6.9), <code class="docutils literal"><span class="pre">TLS1_3</span></code>.</p>
<ul class="simple">
<li>On macOS, you cannot disable <code class="docutils literal"><span class="pre">TLS1_1</span></code> and leave both <code class="docutils literal"><span class="pre">TLS1_0</span></code> and
<code class="docutils literal"><span class="pre">TLS1_2</span></code> enabled. You must disable at least one of the other
two, for example, <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>To list multiple protocols, specify as a comma separated list of
protocols. For example <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>Specifying an unrecognized protocol will prevent the server from
starting.</li>
<li>The specified disabled protocols overrides any default disabled
protocols.</li>
</ul>
<p>Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
1.1+ is available on the system. To enable the disabled TLS 1.0,
specify <code class="docutils literal"><span class="pre">none</span></code> to <a class="reference internal" href="#cmdoption-mongos-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span></code></a>. See <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</p>
<p>Members of replica sets and sharded clusters must speak at least one
protocol in common.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-disallow-protocols"><span class="std std-ref">Disallow Protocols</span></a></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-sslfipsmode">
<code class="descname">--sslFIPSMode</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-sslfipsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongos-tlsfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsFIPSMode</span></code></a> instead.</p>
</div>
<p>Directs the <strong class="program">mongos</strong> to use the FIPS mode of the  TLS/SSL
library. Your system must have a FIPS
compliant library to use the <a class="reference internal" href="#cmdoption-mongos-sslfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--sslFIPSMode</span></code></a> option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">FIPS-compatible TLS/SSL is
available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>. See
<a class="reference internal" href="../../tutorial/configure-fips.html"><span class="doc">Configure MongoDB for FIPS</span></a> for more information.</p>
</div>
</dd></dl>

</div>
<div class="section" id="audit-options">
<h3>Audit Options<a class="headerlink" href="#audit-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongos-auditdestination">
<code class="descname">--auditDestination</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-auditdestination" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> and specifies where
<strong class="program">mongos</strong> sends all audit events.</p>
<p><a class="reference internal" href="#cmdoption-mongos-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">syslog</span></code></td>
<td><p class="first">Output the audit events to syslog in JSON format. Not available on
Windows. Audit messages have a syslog severity level of <code class="docutils literal"><span class="pre">info</span></code>
and a facility level of <code class="docutils literal"><span class="pre">user</span></code>.</p>
<p class="last">The syslog message limit can result in the truncation of
audit messages. The auditing system will neither detect the
truncation nor error upon its occurrence.</p>
</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">console</span></code></td>
<td>Output the audit events to <code class="docutils literal"><span class="pre">stdout</span></code> in JSON format.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">file</span></code></td>
<td>Output the audit events to the file specified in
<a class="reference internal" href="#cmdoption-mongos-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a> in the format specified in
<a class="reference internal" href="#cmdoption-mongos-auditformat"><code class="xref std std-option docutils literal"><span class="pre">--auditFormat</span></code></a>.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-auditformat">
<code class="descname">--auditFormat</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-auditformat" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the format of the output file for <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> if <a class="reference internal" href="#cmdoption-mongos-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> is <code class="docutils literal"><span class="pre">file</span></code>. The
<a class="reference internal" href="#cmdoption-mongos-auditformat"><code class="xref std std-option docutils literal"><span class="pre">--auditFormat</span></code></a> option can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">JSON</span></code></td>
<td>Output the audit events in JSON format to the file specified
in <a class="reference internal" href="#cmdoption-mongos-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">BSON</span></code></td>
<td>Output the audit events in BSON binary format to the file
specified in <a class="reference internal" href="#cmdoption-mongos-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>.</td>
</tr>
</tbody>
</table>
<p>Printing audit events to a file in JSON format degrades server
performance more than printing to a file in BSON format.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-auditpath">
<code class="descname">--auditPath</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-auditpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the output file for <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> if
<a class="reference internal" href="#cmdoption-mongos-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> has value of <code class="docutils literal"><span class="pre">file</span></code>. The <a class="reference internal" href="#cmdoption-mongos-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>
option can take either a full path name or a relative path name.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-auditfilter">
<code class="descname">--auditFilter</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-auditfilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the filter to limit the <a class="reference internal" href="../audit-message.html#audit-action-details-results"><span class="std std-ref">types of operations</span></a> the <a class="reference internal" href="../../core/auditing.html"><span class="doc">audit system</span></a> records. The option takes a string representation
of a query document of the form:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="o">&lt;</span><span class="nx">field1</span><span class="o">&gt;:</span> <span class="o">&lt;</span><span class="nx">expression1</span><span class="o">&gt;</span><span class="p">,</span> <span class="p">...</span> <span class="p">}</span>
</pre></div>
</div>
</div>
<p>The <code class="docutils literal"><span class="pre">&lt;field&gt;</span></code> can be <a class="reference internal" href="../audit-message.html"><span class="doc">any field in the audit message</span></a>, including fields returned in the
<a class="reference internal" href="../audit-message.html#audit-action-details-results"><span class="std std-ref">param</span></a> document. The
<code class="docutils literal"><span class="pre">&lt;expression&gt;</span></code> is a <a class="reference internal" href="../operator/query.html#query-selectors"><span class="std std-ref">query condition expression</span></a>.</p>
<p>To specify an audit filter, enclose the filter document in single
quotes to pass the document as a string.</p>
<p>To specify the audit filter in a <a class="reference internal" href="../configuration-options.html"><span class="doc">configuration file</span></a>, you must use the YAML format of
the configuration file.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

</div>
<div class="section" id="profiler-options">
<h3>Profiler Options<a class="headerlink" href="#profiler-options" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0.</span></p>
</div>
<dl class="option">
<dt id="cmdoption-mongos-slowms">
<code class="descname">--slowms</code><code class="descclassname"> &lt;integer&gt;</code><a class="headerlink" href="#cmdoption-mongos-slowms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 100</p>
<p>The <em>slow</em> operation time threshold, in milliseconds. Operations
that run for longer than this threshold are considered <em>slow</em>.</p>
<p>When <a class="reference internal" href="../parameters.html#param.logLevel" title="param.logLevel"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">logLevel</span></code></a> is set to <code class="docutils literal"><span class="pre">0</span></code>, MongoDB records <em>slow</em>
operations to the diagnostic log at a rate determined by
<a class="reference internal" href="../configuration-options.html#operationProfiling.slowOpSampleRate" title="operationProfiling.slowOpSampleRate"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">slowOpSampleRate</span></code></a>.</p>
<p>At higher <a class="reference internal" href="../parameters.html#param.logLevel" title="param.logLevel"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">logLevel</span></code></a> settings, all operations appear
in the diagnostic log regardless of their latency.</p>
<p>For <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances,  affects the diagnostic
log only and not the profiler since profiling is not available on
<a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0.</span></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-slowopsamplerate">
<code class="descname">--slowOpSampleRate</code><code class="descclassname"> &lt;double&gt;</code><a class="headerlink" href="#cmdoption-mongos-slowopsamplerate" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 1.0</p>
<p>The fraction of <em>slow</em> operations that should be logged.
<a class="reference internal" href="#cmdoption-mongos-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a> accepts values between 0 and 1, inclusive.</p>
<p>For <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances, <a class="reference internal" href="#cmdoption-mongos-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a> affects the diagnostic log
only and not the profiler since profiling is not available on
<a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0.</span></p>
</div>
</dd></dl>

</div>
<div class="section" id="ldap-authentication-and-authorization-options">
<h3>LDAP Authentication and Authorization Options<a class="headerlink" href="#ldap-authentication-and-authorization-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongos-ldapservers">
<code class="descname">--ldapServers</code><code class="descclassname"> &lt;host1&gt;:&lt;port&gt;,&lt;host2&gt;:&lt;port&gt;,...,&lt;hostN&gt;:&lt;port&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapservers" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The LDAP server against which the <strong class="program">mongos</strong> authenticates users or
determines what actions a user is authorized to perform on a given
database. If the LDAP server specified has any replicated instances,
you may specify the host and port of each replicated server in a
comma-delimited list.</p>
<p>If your LDAP infrastructure partitions the LDAP directory over multiple LDAP
servers, specify <em>one</em> LDAP server or any of its replicated instances to
<a class="reference internal" href="#cmdoption-mongos-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">--ldapServers</span></code></a>. MongoDB supports following LDAP referrals as defined in <a class="reference external" href="https://www.rfc-editor.org/rfc/rfc4511.txt">RFC 4511
4.1.10</a>. Do not use <a class="reference internal" href="#cmdoption-mongos-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">--ldapServers</span></code></a>
for listing every LDAP server in your infrastructure.</p>
<p>This setting can be configured on a running <strong class="program">mongos</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<p>If unset, <strong class="program">mongos</strong> cannot use <a class="reference internal" href="../../core/security-ldap.html"><span class="doc">LDAP authentication or authorization</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapvalidateldapserverconfig">
<code class="descname">--ldapValidateLDAPServerConfig</code><code class="descclassname"> &lt;boolean&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapvalidateldapserverconfig" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Available in MongoDB Enterprise</em></p>
<p>A flag that determines if the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance checks
the availability of the <a class="reference internal" href="#cmdoption-mongos-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">LDAP</span> <span class="pre">server(s)</span></code></a> as part of its startup:</p>
<ul class="simple">
<li>If <code class="docutils literal"><span class="pre">true</span></code>, the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance performs the
availability check and only continues to start up if the LDAP
server is available.</li>
<li>If <code class="docutils literal"><span class="pre">false</span></code>, the <a class="reference internal" href="#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance skips the
availability check; i.e. the instance starts up even if the LDAP
server is unavailable.</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapqueryuser">
<code class="descname">--ldapQueryUser</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapqueryuser" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The identity with which <strong class="program">mongos</strong> binds as, when connecting to or
performing queries on an LDAP server.</p>
<p>Only required if any of the following are true:</p>
<ul class="simple">
<li>Using <a class="reference internal" href="../../core/security-ldap-external.html#security-ldap-external"><span class="std std-ref">LDAP authorization</span></a>.</li>
<li>Using an LDAP query for <a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">username</span> <span class="pre">transformation</span></code></a>.</li>
<li>The LDAP server disallows anonymous binds</li>
</ul>
<p>You must use <a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> with <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>.</p>
<p>If unset, <strong class="program">mongos</strong> will not attempt to bind to the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongos</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Windows MongoDB deployments can use <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a>
instead of <a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>. You cannot specify
both <a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> at the same time.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapquerypassword">
<code class="descname">--ldapQueryPassword</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapquerypassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
<p>The password used to bind to an LDAP server when using
<a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a>. You must use <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> with
<a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a>.</p>
</div>
<p>If unset, <strong class="program">mongos</strong> will not attempt to bind to the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongos</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Windows MongoDB deployments can use <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a>
instead of <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>. You cannot specify
both <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> at the same time.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapbindwithosdefaults">
<code class="descname">--ldapBindWithOSDefaults</code><code class="descclassname"> &lt;bool&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapbindwithosdefaults" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: false</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise for the Windows platform only.</p>
</div>
<p>Allows <strong class="program">mongos</strong> to authenticate, or bind, using your Windows login
credentials when connecting to the LDAP server.</p>
<p>Only required if:</p>
<ul class="simple">
<li>Using <a class="reference internal" href="../../core/security-ldap-external.html#security-ldap-external"><span class="std std-ref">LDAP authorization</span></a>.</li>
<li>Using an LDAP query for <a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">username</span> <span class="pre">transformation</span></code></a>.</li>
<li>The LDAP server disallows anonymous binds</li>
</ul>
<p>Use <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> to replace <a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and
<a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapbindmethod">
<code class="descname">--ldapBindMethod</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapbindmethod" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: simple</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The method <strong class="program">mongos</strong> uses to authenticate to an LDAP server.
Use with <a class="reference internal" href="#cmdoption-mongos-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongos-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> to
connect to the LDAP server.</p>
<p><a class="reference internal" href="#cmdoption-mongos-ldapbindmethod"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindMethod</span></code></a> supports the following values:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">simple</span></code> - <strong class="program">mongos</strong> uses simple authentication.</li>
<li><code class="docutils literal"><span class="pre">sasl</span></code> - <strong class="program">mongos</strong> uses SASL protocol for authentication</li>
</ul>
<p>If you specify <code class="docutils literal"><span class="pre">sasl</span></code>, you can configure the available SASL mechanisms
using <a class="reference internal" href="#cmdoption-mongos-ldapbindsaslmechanisms"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindSaslMechanisms</span></code></a>. <strong class="program">mongos</strong> defaults to
using <code class="docutils literal"><span class="pre">DIGEST-MD5</span></code> mechanism.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapbindsaslmechanisms">
<code class="descname">--ldapBindSaslMechanisms</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapbindsaslmechanisms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: DIGEST-MD5</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>A comma-separated list of SASL mechanisms <strong class="program">mongos</strong> can
use when authenticating to the LDAP server. The <strong class="program">mongos</strong> and the
LDAP server must agree on at least one mechanism. The <strong class="program">mongos</strong>
dynamically loads any SASL mechanism libraries installed on the host
machine at runtime.</p>
<p>Install and configure the appropriate libraries for the selected
SASL mechanism(s) on both the <strong class="program">mongos</strong> host and the remote
LDAP server host. Your operating system may include certain SASL
libraries by default. Defer to the documentation associated with each
SASL mechanism for guidance on installation and configuration.</p>
<p>If using the <code class="docutils literal"><span class="pre">GSSAPI</span></code> SASL mechanism for use with
<a class="reference internal" href="../../core/kerberos.html#security-kerberos"><span class="std std-ref">Kerberos Authentication</span></a>, verify the following for the
<strong class="program">mongos</strong> host machine:</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">Linux</span></code></dt>
<dd><ul class="first last simple">
<li>The <code class="docutils literal"><span class="pre">KRB5_CLIENT_KTNAME</span></code> environment
variable resolves to the name of the client <a class="reference internal" href="../../core/kerberos.html#keytab-files"><span class="std std-ref">Linux Keytab Files</span></a>
for the host machine. For more on Kerberos environment
variables, please defer to the
<a class="reference external" href="https://web.mit.edu/kerberos/krb5-1.13/doc/admin/env_variables.html">Kerberos documentation</a>.</li>
<li>The client keytab includes a
<a class="reference internal" href="../../core/kerberos.html#kerberos-user-principal"><span class="std std-ref">User Principal</span></a> for the <strong class="program">mongos</strong> to use when
connecting to the LDAP server and execute LDAP queries.</li>
</ul>
</dd>
<dt><code class="docutils literal"><span class="pre">Windows</span></code></dt>
<dd>If connecting to an Active Directory server, the Windows
Kerberos configuration automatically generates a
<a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380510(v=vs.85).aspx">Ticket-Granting-Ticket</a>
when the user logs onto the system. Set <a class="reference internal" href="#cmdoption-mongos-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> to
<code class="docutils literal"><span class="pre">true</span></code> to allow <strong class="program">mongos</strong> to use the generated credentials when
connecting to the Active Directory server and execute queries.</dd>
</dl>
<p>Set <a class="reference internal" href="#cmdoption-mongos-ldapbindmethod"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindMethod</span></code></a> to <code class="docutils literal"><span class="pre">sasl</span></code> to use this option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>For a complete list of SASL mechanisms see the
<a class="reference external" href="http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml">IANA listing</a>.
Defer to the documentation for your LDAP or Active Directory
service for identifying the SASL mechanisms compatible with the
service.</p>
<p>MongoDB is not a source of SASL mechanism libraries, nor
is the MongoDB documentation a definitive source for
installing or configuring any given SASL mechanism. For
documentation and support, defer to the SASL mechanism
library vendor or owner.</p>
<p>For more information on SASL, defer to the following resources:</p>
<ul class="last simple">
<li>For Linux, please see the <a class="reference external" href="https://www.cyrusimap.org/sasl/">Cyrus SASL documentation</a>.</li>
<li>For Windows, please see the <a class="reference external" href="https://msdn.microsoft.com/en-us/library/cc223500.aspx">Windows SASL documentation</a>.</li>
</ul>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldaptransportsecurity">
<code class="descname">--ldapTransportSecurity</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldaptransportsecurity" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: tls</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>By default, <strong class="program">mongos</strong> creates a TLS/SSL secured connection to the LDAP
server.</p>
<p>For Linux deployments, you must configure the appropriate TLS Options in
<code class="docutils literal"><span class="pre">/etc/openldap/ldap.conf</span></code> file. Your operating system’s package manager
creates this file as part of the MongoDB Enterprise installation, via the
<code class="docutils literal"><span class="pre">libldap</span></code> dependency. See the documentation for <code class="docutils literal"><span class="pre">TLS</span> <span class="pre">Options</span></code> in the
<a class="reference external" href="http://www.openldap.org/software/man.cgi?query=ldap.conf&amp;manpath=OpenLDAP+2.4-Release">ldap.conf OpenLDAP documentation</a>
for more complete instructions.</p>
<p>For Windows deployment, you must add the LDAP server CA certificates to the
Windows certificate management tool. The exact name and functionality of the
tool may vary depending on operating system version. Please see the
documentation for your version of Windows for more information on
certificate management.</p>
<p>Set <a class="reference internal" href="#cmdoption-mongos-ldaptransportsecurity"><code class="xref std std-option docutils literal"><span class="pre">--ldapTransportSecurity</span></code></a> to <code class="docutils literal"><span class="pre">none</span></code> to disable TLS/SSL between <strong class="program">mongos</strong> and the LDAP
server.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Setting <a class="reference internal" href="#cmdoption-mongos-ldaptransportsecurity"><code class="xref std std-option docutils literal"><span class="pre">--ldapTransportSecurity</span></code></a> to <code class="docutils literal"><span class="pre">none</span></code> transmits plaintext information and possibly
credentials between <strong class="program">mongos</strong> and the LDAP server.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldaptimeoutms">
<code class="descname">--ldapTimeoutMS</code><code class="descclassname"> &lt;long&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldaptimeoutms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 10000</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The amount of time in milliseconds <strong class="program">mongos</strong> should wait for an LDAP server
to respond to a request.</p>
<p>Increasing the value of <a class="reference internal" href="#cmdoption-mongos-ldaptimeoutms"><code class="xref std std-option docutils literal"><span class="pre">--ldapTimeoutMS</span></code></a> may prevent connection failure between the
MongoDB server and the LDAP server, if the source of the failure is a
connection timeout. Decreasing the value of <a class="reference internal" href="#cmdoption-mongos-ldaptimeoutms"><code class="xref std std-option docutils literal"><span class="pre">--ldapTimeoutMS</span></code></a> reduces the time
MongoDB waits for a response from the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongos</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongos-ldapusertodnmapping">
<code class="descname">--ldapUserToDNMapping</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongos-ldapusertodnmapping" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>Maps the username provided to <strong class="program">mongos</strong> for authentication to a LDAP
Distinguished Name (DN). You may need to use <a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> to transform a
username into an LDAP DN in the following scenarios:</p>
<ul class="simple">
<li>Performing LDAP authentication with simple LDAP binding, where users
authenticate to MongoDB with usernames that are not full LDAP DNs.</li>
<li>Using an <a class="reference internal" href="mongod.html#cmdoption-mongod-ldapauthzquerytemplate"><code class="xref std std-option docutils literal"><span class="pre">LDAP</span> <span class="pre">authorization</span> <span class="pre">query</span> <span class="pre">template</span></code></a> that requires a DN.</li>
<li>Transforming the usernames of clients authenticating to Mongo DB using
different authentication mechanisms (e.g. x.509, kerberos) to a full LDAP
DN for authorization.</li>
</ul>
<p><a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> expects a quote-enclosed JSON-string representing an ordered array
of documents. Each document contains a regular expression <code class="docutils literal"><span class="pre">match</span></code> and
either a <code class="docutils literal"><span class="pre">substitution</span></code> or <code class="docutils literal"><span class="pre">ldapQuery</span></code> template used for transforming the
incoming username.</p>
<p>Each document in the array has the following form:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nx">match</span><span class="o">:</span> <span class="s2">&quot;&lt;regex&gt;&quot;</span>
  <span class="nx">substitution</span><span class="o">:</span> <span class="s2">&quot;&lt;LDAP DN&gt;&quot;</span> <span class="o">|</span> <span class="nx">ldapQuery</span><span class="o">:</span> <span class="s2">&quot;&lt;LDAP Query&gt;&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="10%" />
<col width="70%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Field</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">match</span></code></td>
<td>An ECMAScript-formatted regular expression (regex) to match against a
provided username. Each parenthesis-enclosed section represents a
regex capture group used by <code class="docutils literal"><span class="pre">substitution</span></code> or <code class="docutils literal"><span class="pre">ldapQuery</span></code>.</td>
<td><code class="docutils literal"><span class="pre">&quot;(.+)ENGINEERING&quot;</span></code>
<code class="docutils literal"><span class="pre">&quot;(.+)DBA&quot;</span></code></td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">substitution</span></code></td>
<td><p class="first">An LDAP distinguished name (DN) formatting template that converts the
authentication name matched by the <code class="docutils literal"><span class="pre">match</span></code> regex into a LDAP DN.
Each curly bracket-enclosed numeric value is replaced by the
corresponding <a class="reference external" href="http://www.regular-expressions.info/refcapture.html">regex capture group</a> extracted
from the authentication username via the <code class="docutils literal"><span class="pre">match</span></code> regex.</p>
<p class="last">The result of the substitution must be an <a class="reference external" href="https://www.ietf.org/rfc/rfc4514.txt">RFC4514</a> escaped string.</p>
</td>
<td><code class="docutils literal"><span class="pre">&quot;cn={0},ou=engineering,</span>
<span class="pre">dc=example,dc=com&quot;</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">ldapQuery</span></code></td>
<td>A LDAP query formatting template that inserts the authentication
name matched by the <code class="docutils literal"><span class="pre">match</span></code> regex into an LDAP query URI encoded
respecting RFC4515 and RFC4516. Each curly bracket-enclosed numeric
value is replaced by the corresponding <a class="reference external" href="http://www.regular-expressions.info/refcapture.html">regex capture group</a> extracted
from the authentication username via the <code class="docutils literal"><span class="pre">match</span></code> expression.
<strong class="program">mongos</strong> executes the query against the LDAP server to retrieve
the LDAP DN for the authenticated user. <strong class="program">mongos</strong> requires
exactly one returned result for the transformation to be
successful, or <strong class="program">mongos</strong> skips this transformation.</td>
<td><code class="docutils literal"><span class="pre">&quot;ou=engineering,dc=example,</span>
<span class="pre">dc=com??one?(user={0})&quot;</span></code></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">An explanation of  <a class="reference external" href="https://www.ietf.org/rfc/rfc4514.txt">RFC4514</a>,
<a class="reference external" href="https://tools.ietf.org/search/rfc4515">RFC4515</a>,
<a class="reference external" href="https://tools.ietf.org/html/rfc4516">RFC4516</a>, or LDAP queries is out
of scope for the MongoDB Documentation. Please review the RFC directly or
use your preferred LDAP resource.</p>
</div>
<p>For each document in the array, you must use either <code class="docutils literal"><span class="pre">substitution</span></code> or
<code class="docutils literal"><span class="pre">ldapQuery</span></code>. You <em>cannot</em> specify both in the same document.</p>
<p>When performing authentication or authorization, <strong class="program">mongos</strong> steps through
each document in the array in the given order, checking the authentication
username against the <code class="docutils literal"><span class="pre">match</span></code> filter.  If a match is found,
<strong class="program">mongos</strong> applies the transformation and uses the output for
authenticating the user. <strong class="program">mongos</strong> does not check the remaining documents
in the array.</p>
<p>If the given document does not match the provided authentication name, or
the transformation described by the document fails, <strong class="program">mongos</strong> continues
through the list of documents to find additional matches. If no matches are
found in any document, <strong class="program">mongos</strong> returns an error.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p>The following shows two transformation documents. The first
document matches against any string ending in <code class="docutils literal"><span class="pre">&#64;ENGINEERING</span></code>, placing
anything preceeding the suffix into a regex capture group. The
second document matches against any string ending in <code class="docutils literal"><span class="pre">&#64;DBA</span></code>, placing
anything preceeding the suffix into a regex capture group.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">You must pass the array to <a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> as a string.</p>
</div>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-text"><div class="highlight"><pre><span></span>&quot;[
   {
      match: &quot;(.+)@ENGINEERING.EXAMPLE.COM&quot;,
      substitution: &quot;cn={0},ou=engineering,dc=example,dc=com&quot;
   },
   {
      match: &quot;(.+)@DBA.EXAMPLE.COM&quot;,
      ldapQuery: &quot;ou=dba,dc=example,dc=com??one?(user={0})&quot;

   }

]&quot;
</pre></div>
</div>
</div>
<p>A user with username <code class="docutils literal"><span class="pre">alice&#64;ENGINEERING.EXAMPLE.COM</span></code> matches the first
document. The regex capture group <code class="docutils literal"><span class="pre">{0}</span></code> corresponds to the string
<code class="docutils literal"><span class="pre">alice</span></code>. The resulting output is the DN
<code class="docutils literal"><span class="pre">&quot;cn=alice,ou=engineering,dc=example,dc=com&quot;</span></code>.</p>
<p class="last">A user with username <code class="docutils literal"><span class="pre">bob&#64;DBA.EXAMPLE.COM</span></code> matches the second document.
The regex capture group <code class="docutils literal"><span class="pre">{0}</span></code> corresponds to the string <code class="docutils literal"><span class="pre">bob</span></code>.  The
resulting output is the LDAP query
<code class="docutils literal"><span class="pre">&quot;ou=dba,dc=example,dc=com??one?(user=bob)&quot;</span></code>. <strong class="program">mongos</strong> executes this
query against the LDAP server, returning the result
<code class="docutils literal"><span class="pre">&quot;cn=bob,ou=dba,dc=example,dc=com&quot;</span></code>.</p>
</div>
<p>If <a class="reference internal" href="#cmdoption-mongos-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> is unset, <strong class="program">mongos</strong> applies no transformations to the username
when attempting to authenticate or authorize a user against the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongos</strong> using the
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a> database command.</p>
</dd></dl>

</div>
<div class="section" id="additional-options">
<h3>Additional Options<a class="headerlink" href="#additional-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongos-ipv6">
<code class="descname">--ipv6</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongos-ipv6" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables IPv6 support. <strong class="program">mongos</strong> disables IPv6 support by default.</p>
<p>Setting <a class="reference internal" href="#cmdoption-mongos-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a> does <em>not</em> direct the <strong class="program">mongos</strong> to listen on any
local IPv6 addresses or interfaces. To configure the <strong class="program">mongos</strong> to
listen on an IPv6 interface, you must either:</p>
<ul class="simple">
<li>Configure <a class="reference internal" href="#cmdoption-mongos-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a> with one or more IPv6 addresses or
hostnames that resolve to IPv6 addresses, <strong>or</strong></li>
<li>Set <a class="reference internal" href="#cmdoption-mongos-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> to <code class="docutils literal"><span class="pre">true</span></code>.</li>
</ul>
</dd></dl>

</div>
</div>
</div>

                
    <div id="btnv">
      <span class="btn-arrow-left">&larr; &nbsp;</span>
      <a class="btn-prev-text" href="mongod.html" title="Previous Section: mongod"><span>mongod</span></a>
      <a class="btn-next-text" href="mongo.html" title="Next Section: mongo"><span>mongo</span></a>
      <span class="btn-arrow-right">&nbsp;&rarr;</span>
    </div>
                  <div class="footer">
                    <div class="copyright">
                      <p>&copy; MongoDB, Inc 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.</p>
                    </div>
                  </div>
              </div></div>
            </div>
        </div>
    </div>
    <div class="right-column">
      <div class="wrapper"> <div id='mongodb-docs-1'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('mongodb-docs-1'); });
   </script>
</div>
            <div class="social">
               <a class="slack-icon" href="https://slackpass.io/mongo-db?jmp=docs" title="https://slackpass.io/mongo-db?jmp=docs"><i class="fab fa-slack" aria-hidden="true"></i></a>
               <a class="twitter-icon" href="https://twitter.com/MongoDB" title="https://twitter.com/MongoDB"><i class="fab fa-twitter-square"></i></a>
               <a class="youtube-icon" href="https://www.youtube.com/user/MongoDB" title="https://www.youtube.com/user/MongoDB"><i class="fab fa-youtube-square"></i></a>
               <a class="facebook-icon" href="https://www.facebook.com/mongodb" title="https://www.facebook.com/mongodb"><i class="fab fa-facebook-square"></i></a>
               <a class="stack-overflow-icon" href="https://stackoverflow.com/tags/mongodb/info" title="https://stackoverflow.com/tags/mongodb/info"><i class="fab fa-stack-overflow" aria-hidden="true"></i></a>
            </div>
        

      </div>
    </div>
    
      <div id="rating-panel"></div>
    
    <div class="clearfix"></div>
  </div>
  

  <script type="text/javascript">
  // Bootstrap array of links that should trigger a full page reload
  window.docsExcludedNav = ['/administration', '/administration/production-checklist', '/administration/indexes-management', '/aggregation', '/applications/geospatial-indexes', '/applications/indexes', '/contributors/getting-started', '/core/2d', '/core/2dsphere', '/core/auditing', '/core/authentication', '/core/authorization', '/core/backups', '/core/read-isolation-consistency-recency', '/core/databases-and-collections', '/core/geohaystack', '/core/index-single', '/core/index-compound', '/core/index-creation', '/core/index-hashed', '/core/index-multikey', '/core/index-partial', '/core/index-sparse', '/core/index-text', '/core/index-ttl', '/core/index-unique', '/core/index-wildcard', '/core/journaling', '/core/kerberos', '/core/map-reduce', '/core/operational-segregation', '/core/query-optimization', '/core/read-preference', '/core/replica-set-architectures', '/core/replica-set-high-availability', '/core/replica-set-members', '/core/replica-set-secondary', '/core/transactions', '/geospatial-queries', '/replication', '/core/sharded-cluster-components', '/core/wiredtiger', '/core/write-operations-atomicity', '/crud', '/indexes', '/installation', '/introduction', '/mongo', '/products/bi-connector', '/reference/command', '/reference/collation', '/text-search', '/tutorial/manage-the-database-profiler', '/core/index-text', '/reference/bson-types', '/reference/configuration-options', '/reference/indexes', '/reference/method', '/reference/operator/aggregation', '/reference/operator/query', '/reference/operator/query-modifier', '/reference/operator/update', '/reference/replication', '/reference/read-concern', '/reference/security', '/reference/sharding', '/reference/write-concern', '/release-notes/2.4', '/release-notes/2.6', '/release-notes/2.8', '/release-notes/3.0', '/release-notes/3.2', '/release-notes/3.4', '/release-notes/3.6', '/release-notes/4.0', '/release-notes/4.2', '/security', '/sharding', '/changeStreams', '/core/zone-sharding', '/core/hashed-sharding', '/core/ranged-sharding', '/storage', '/tutorial/change-sharded-cluster-wiredtiger', '/tutorial/insert-documents', '/tutorial/query-documents', '/tutorial/remove-documents', '/tutorial/update-documents', '/tutorial/enable-authentication', '/tutorial/install-mongodb-on-ubuntu', '/tutorial/install-mongodb-on-windows', '/tutorial/install-mongodb-on-red-hat', '/tutorial/install-mongodb-on-debian', '/tutorial/install-mongodb-on-suse', '/tutorial/install-mongodb-on-amazon', '/tutorial/install-mongodb-enterprise-on-ubuntu', '/tutorial/install-mongodb-enterprise-on-windows', '/tutorial/install-mongodb-enterprise-on-red-hat', '/tutorial/install-mongodb-enterprise-on-debian', '/tutorial/install-mongodb-enterprise-on-suse', '/tutorial/install-mongodb-enterprise-on-amazon', '/tutorial/install-mongodb-on-os-x'];
  </script></body>
</html>